Timer 1 external oscilator- Max Freq?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Desterline's Avatar
    Desterline Guest

    Default Timer 1 external oscilator- Max Freq?

    I need to count pulses from a fast clock source (50 Mhz +). Obviously that's beyond what a pic can do without help. My plan (at least until I find a better one) is to run the clock through an external counter of sufficent width to divide the clock to something the pic can handle. Then I can just shft a few bits, read the external counter and reconstruct the real count.

    But I need to decide how much counter I need, and that's dictated by how fast I can clock timer 1 in async mode, so...

    If I'm correctly interpreting the datasheet for the 16F87xA, the T1CLK input period in async counter mode is 60 ns for the 'F' part and 100 ns for the LF.
    So that's 16.6 MHz and 10 MHz right?

    If I used an LF part at 5v, would it still be limited to the lower spec?


    I'd be interested to hear about anyone else's experiences using timer1 near it's maximum speed.

    Unless there's a better option I'm overlooking?

    Thanks
    -Denny

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Desterline,

    Long time no hear...Great to see you again.

    D>>I'd be interested to hear about anyone else's experiences using timer1 near it's maximum speed.

    Unless there's a better option I'm overlooking?<<


    Just for kicks, In Ham radio, we combine two frequencies, and get different results. the results we use to amplify and receive our original signal.

    Could you inject a frequency into your 50 MHZ signal so that the result can be used by your PIC? Maybe a 49MHZ and use the 1 MHZ difference for the chip to capitalize on?

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Desterline's Avatar
    Desterline Guest


    Did you find this post helpful? Yes | No

    Default

    Originally posted by Dwayne
    Hello Desterline,

    Long time no hear...Great to see you again.
    I've been around, just not actively posting. Time's been in short supply the last few months.


    D>>I'd be interested to hear about anyone else's experiences using timer1 near it's maximum speed.

    Unless there's a better option I'm overlooking?<<


    Just for kicks, In Ham radio, we combine two frequencies, and get different results. the results we use to amplify and receive our original signal.

    Could you inject a frequency into your 50 MHZ signal so that the result can be used by your PIC? Maybe a 49MHZ and use the 1 MHZ difference for the chip to capitalize on?

    Dwayne
    Hmmm... Interesting possibility, but I don't think it'll work in this case. I'm actualy trying to time something very precisely. Basicly a super stopwatch. (10s of nanoseconds accuracy over ~5 minute period).

    I don't realy see how to maintain the precision without actualy counting the higher frequency.

    With such resolution and range it works out to about 40 bits of counter. I was hoping to keep the chip count low by doing the slower count on the pic. Right now it looks like one external four bit counter, 16 bits of timer 1 and a software counter beyond that.

    50MHz /16 drops it to just over 3 MHz, but another part of the project needs one D-flipflop, I was thinking about spliting one off the counter to keep chip count low. The the pic would have to count ~6.25MHz. Doable, asuming I read the datasheet correctly :-)

    But I'm open to better ideas...
    -Denny

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


    Did you find this post helpful? Yes | No

    Default

    CD74HC4059 : Divide by n counter is *suppose* to accept typ 54 MHZ Fmax if interpret datasheet the good way
    have a look there

    ( http://focus.ti.com/lit/ds/symlink/cd74hc4059.pdf )

    hope this may help you
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    Take a look at Microchips Application Note AN592

    Frequency Counter Using PIC16C5x

    http://www.microchip.com/stellent/id...pnote=en011033

    Supposedly this will work up to 50Mhz, although I haven't tried it myself.

    I also assume it can be applied to a 16F876, since the timer0 modules are pretty much the same thing.

    And, here's a link to a project where somebody applied AN592 to a 16F84.
    http://digilander.libero.it/ik3oil/_...o_eng_2003.pdf

    HTH,
    &nbsp;&nbsp;&nbsp;Darrel

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. 32 bit square root
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 6th May 2009, 03:37
  4. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  5. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14:23

Members who have read this thread : 1

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