How to read timer1 value?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Posts
    2

    Lightbulb How to read timer1 value?

    Hi, everyone!

    I want to create a counter that increments every 100ms, using timer1. So I need to set the timer1 prescale to 1:8 and wait until it reaches 12500 (using a 4MHz oscillator). Then this value is cleared and the process repeats again. The problem is that I donīt know what to do with the registers TMR1L and TMR1H to figure out the actual value of timer1. What must I do?

    Thank you!
    Last edited by Ferocactus; - 20th January 2011 at 17:37.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jan 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Thanks for the quick reply, mackrackit! I tried your suggestion and it worked very well! Simple and easy.

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