Timer Prescales - maximum time before overflow


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    44

    Default Timer Prescales - maximum time before overflow

    Just a quick question, can someone tell me what the maximum time timer1 will count before an overflow occurs, at 4mhz and the following prescales (in uS or mS)

    1:1
    1:2
    1:4
    1:8

    I need to have a timer that will work upto 256ms - is this possible?

    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    Timer1 is a 16-bit Timer... it will tick once every 1uS at 4MHz.

    Given that, it will count to 65535 before generating a Flag/Interrupt as it rolls back to zero. So, in it's native 1:1 prescaler state it will do this every 65.336mS @ 4MHz.

    Prescaling 2:1 will double that... 4:1 will quadruple it etc. You can do the math.

  3. #3
    Join Date
    Aug 2005
    Posts
    44


    Did you find this post helpful? Yes | No

    Default

    Thanks melanie, thats what i needed

    Now i just need to figure out how to do my time divisions exponentially

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. Get elapsed time while TIMER samples pulses
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th March 2009, 16:27
  3. Speed of USB EasyHID and Time problem
    By sjohansson in forum USB
    Replies: 10
    Last Post: - 18th January 2007, 22:21
  4. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

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