Triggering 5 TTL clocks simultaneously


Closed Thread
Results 1 to 40 of 84

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    1.) Is there a way to split PORTA into analog and digital inputs?
    for sure... see datasheet in the A/D section.. ADCON1 TABLE 19-2

    will be interesting to have kind of flowchart and schematic for the other problems you have.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    TurboLS,

    What version of PBP are you using? I've never seen this work in any versions I've had.

    IF vertpulse < 512
    THEN GOTO horizloop
    ELSE GOTO buttonloop

    I've wanted to use that type of syntax before, but I get nothing but errors. Did I miss an update or something. I have 2.45

    Darrel
    DT

  3. #3
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    I am using 2.46 and I will have a pic up soon that has the timing scheme. thanks for the replies.

  4. #4
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    here is the timing diagram. notice how the reset, H1, and H2 are in synch at the lower right. Also notice that the reset is going all the time, even when the other 4 clocks are not.

    please click the link and scroll to page 13

    http://www.kodak.com/global/plugins/...2ELongSpec.pdf

    thanks.
    Last edited by TurboLS; - 21st February 2005 at 23:56.

  5. #5
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    Oh yeah, i am gettin some errors from that if else stuff too.... gonna have to find a way around that arghhhh!

    scratch that, you just have to put all the commands on the same line, like so:

    IF vertpulse < 512 THEN GOTO horizloop ELSE GOTO buttonloop

    however, i still have 9 errors to fix before mine compiles properly.
    Last edited by TurboLS; - 22nd February 2005 at 00:13.

  6. #6
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    Also, I tried looking at the ADCON1 register, and i guess if I am reading from the table properly... to set PORTA.2 to digital in, I should say ADCON1 = %00001101 cuz that's where the D and the AN2 meet.

    I am still having a problem with the OnPushButton command and apparently I have to use END IF commands, which I am not sure how I will implement just yet.

  7. #7
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    I got it down to 6 errors, all with my IF statements. Here is what I have for a generic IF line:

    IF PushButtonOnPORTABIT2 = 1 THEN GOTO vertloop ELSE GOTO buttonloop

    on the following line i have

    ENDIF

    and doing that got rid of 3 of the errors, but now I need to figure out why it doesn't like my then goto / else goto commands.

    For each of my 3 if statements, I get

    bad expression
    bad expression or missing then
    Last edited by TurboLS; - 22nd February 2005 at 00:53.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    IF vertpulse < 512 THEN GOTO horizloop ELSE GOTO buttonloop
    I prefer like this

    Code:
    IF vertpulse < 512 THEN 
        GOTO horizloop 
    ELSE 
        GOTO buttonloop
    ENDIF
    Using Alias to i/o
    Code:
    TRISA = 255 ' Set PORTA as input
    
    PushButton1 var PORTA.0
    PushButton2 var PORTA.1
    PushButton3 var PORTA.2
    
    IF PushButton1 then ' Same as PushButton=1
       ' do your stuff here
    ENDIF
    Last edited by mister_e; - 22nd February 2005 at 01:37.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 20:52
  2. How do I set GPIO 0-2 and 5 simultaneously?
    By cstack in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th August 2009, 10:32
  3. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30
  4. Replies: 11
    Last Post: - 13th July 2005, 20:26

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts