Triggering 5 TTL clocks simultaneously


Closed Thread
Results 1 to 40 of 84

Hybrid View

  1. #1
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    I was thinking of doing the reset on one of those HWPM things because the reset is the only constant clock. Then I could just do a conditional statement to make sure that the reset and the horizontal clocks are in synch. The good thing about that, like you said, it would run in the background and so I could run all the other clocks just as I had them. What do you think??

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


    Did you find this post helpful? Yes | No

    Default

    Then I could just do a conditional statement to make sure that the reset and the horizontal clocks are in synch
    mmm, IMO you can't check with internal to synchronize them. I figure you'll have to use an extra i/o to read from the PWM output. Once you get the highlevel or interrupt, you do your Horizontal stuff. A microsecond or less of
    delay between to rising edge of Reset and your Horizontal... but at 3.6KHZ i can't figure it will be a big problem.
    Steve

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

  3. #3
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    So you're saying something like:

    IF PWM output is high, start the horizontal clocks

    Yeah, using another I/O pin is not a problem, cuz at this point i think i am using 2 pins of portA

    How would I go about getting the HPWM to oscillate at 3.6kHz with a 25% duty cycle? I will look at the manual again later today or tomorrow probably and see if i can figure it out.

    thanks again, you are a huge help.

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


    Did you find this post helpful? Yes | No

    Default

    it's a bit more than if pin is high... IF the according pin is at the rising edge of the signal... this ensure the right timing. Use interrupt source INT0, INT1 or else you can have on the rising edge... will be really easy now. The only thing you have to care about is the timing and latency in the other routines to get interrupt as quick as possible.

    For the HPWM frequency and duty cycle, try

    HPWM 1,64,3600 ' supposed to send HPWM 3.6KHZ at 25% duty

    i don't know how accurate it will be. In my purpose i always set all the register myself. In your datasheet they tell you how to calculate everything.
    Last edited by mister_e; - 22nd February 2005 at 19:29.
    Steve

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

  5. #5
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    What pin would that HPWM be coming off of??

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


    Did you find this post helpful? Yes | No

    Default

    HPWM channel = CCP1 of your 18F4520 = PIN RC2 PIN 17
    Steve

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

  7. #7
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    So I guess I could have it running in the background, then when I want to start the horizontal clocks, I could do an ON INTERRUPT command to make sure it is on the rising edge of the Reset HWPM clock.

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, 19: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, 09:32
  3. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  4. Replies: 11
    Last Post: - 13th July 2005, 19: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