Maximum frequency count on 16F628/4MHz


Closed Thread
Results 1 to 11 of 11
  1. #1
    solara's Avatar
    solara Guest

    Default Maximum frequency count on 16F628/4MHz

    Whats the maximum physical frequency that can be counted on a 16F628 using a 16F628 (using 16 bit TIMER1 as a pulse counter)?

    Is this limited by the minimum rise and fall times for the 16F628.
    Anybody know what the practical/theoretical limit is?

  2. #2
    solara's Avatar
    solara Guest


    Did you find this post helpful? Yes | No

    Default

    I should have mentioned this is an external asynchronous clock signal, which is being measured.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Datasheet, Table 17-7, Parameters 45, 46 & 47. These values are independent of actual Processor Clock Speed.

  4. #4
    solara's Avatar
    solara Guest


    Did you find this post helpful? Yes | No

    Default

    For an asynchronous external clock on a 16F628
    45=30ns
    46=30ns
    47=60ns

    This doesnt help me as there is no specified minimimum rise and fall times.
    And from the figures above 45+46+rise+fall=47.

  5. #5
    solara's Avatar
    solara Guest


    Did you find this post helpful? Yes | No

    Default

    Is this saying that the maximum external asynchronous clock frequency is 1/60ns =16 MHZ?
    Sounds far too low.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    That's what it's telling you. If you don't believe it, take a signal generator and run a test. The PIC isn't exactly a speed demon.

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


    Did you find this post helpful? Yes | No

    Default

    Hi solara,

    You had specified Timer1, which is slower than Timer0.

    If you use Timer0, you can measure up to 50Mhz, even with a 4Mhz osc.

    Using the Prescaler, it actualy works like a 16-bit Counter. It's a little tricky to get the lower 8-bits. But it can be done.

    Check out AN592 from Microchip
    AN592: Frequency Counter Using PIC16C5x

    HTH,
       Darrel

  8. #8
    solara's Avatar
    solara Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrrel,
    Thats what I wanted to hear.

  9. #9
    solara's Avatar
    solara Guest


    Did you find this post helpful? Yes | No

    Default

    Looks like TMR0 is still bound by the same limits as TMR1 on 16F628 (according to datasheets).
    Also the AN592 doc is only for PIC 16CXXX, which can measure up to 50MHZ.

  10. #10
    solara's Avatar
    solara Guest


    Did you find this post helpful? Yes | No

    Default

    Just had another more detailed browse at the 16F628 sheets, and see that with prescaler the high and low pulse widths are min 10ns. Implying period=20ns = 50MHZ.

    Thanks everyone.

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    Hi, solara

    It works ...

    Alain
    Attached Images Attached Images  

Similar Threads

  1. COUNT is not counting again
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 19th June 2009, 04:52
  2. Can't get COUNT to count
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 23rd March 2009, 23:14
  3. HPWM command and oscillator frequency
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th March 2009, 22:41
  4. Frequency Counter
    By Asmith in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 22nd June 2007, 15:54
  5. inaccurate frequency using TMR1 PI18F452
    By nkarpovich in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 14th October 2006, 16:22

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