PDA

View Full Version : How to read timer1 value?



Ferocactus
- 20th January 2011, 16:45
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!

mackrackit
- 20th January 2011, 17:17
Does this help?
http://www.picbasic.co.uk/forum/showthread.php?t=13868&p=95403#post95403

Ferocactus
- 20th January 2011, 23:19
Thanks for the quick reply, mackrackit! I tried your suggestion and it worked very well! Simple and easy.:rolleyes: