Timers perhaps?


Closed Thread
Results 1 to 13 of 13

Thread: Timers perhaps?

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    Forgive me if I'm wrong, but I think you might be missing something (or more likely I haven't explained it properly).

    I'll let you know how I think this works, and you can tell me where I'm missing the boat.

    With this code, Pin A.6/Clkout is putting out a 1Mhz stream.
    With the selected prescale, the interrupt will fire on every 4096 ticks of the main clock.
    When the interrupt fires, it sets port B.7 high, then low.

    Effectively, this gives me a 1Mhz signal on A.6, and a 244Hz signal on B.7.

    I'm not trying to generate the "fast" signal, as that's done by Clkout. I'm just trying to generate the "slow" signal.

    Do I have this right?

    My apologies for the poor explanations.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Doormatt View Post
    With this code, Pin A.6/Clkout is putting out a 1Mhz stream. With the selected prescale, the interrupt will fire on every 4096 ticks of the main clock. When the interrupt fires, it sets port B.7 high, then low. Effectively, this gives me a 1Mhz signal on A.6, and a 244Hz signal on B.7. I'm not trying to generate the "fast" signal, as that's done by Clkout. I'm just trying to generate the "slow" signal.
    Aha! You see, the problem is, you didn't tell me that you were going to use ClkOut for one of your pulse sources!
    Now this makes sense...
    Yes, this should work exactly as you describe.

  3. #3
    Join Date
    Aug 2006
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    *Grin*

    Sorry! It was one of those cases of too much information trying to come out at once.

    Thank you again for working through this with me. It was greatly appreciated.

Similar Threads

  1. Timers
    By mitchf14 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th November 2008, 20:08
  2. Reading Timers
    By kevj in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th August 2007, 08:19
  3. hardware timers
    By Adam in forum General
    Replies: 3
    Last Post: - 7th March 2007, 00:10
  4. Availability of PIC timers from PBP
    By coda64 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th February 2006, 07:18
  5. Count Down Timers
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th October 2005, 17:34

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