It doesn't. As Al wrote previously it measures in "ticks" where one "tick" is equal to 1/(Fosc/4). At 4MHz one tick is 1us, at 20Mhz one tick is 200ns and so on. This is with the timers prescaler set to 1:1.
You need to convert from "ticks" to ms when the measurement is done.
In what range are we talking here, 10ms, 100ms, 50000000ms? TMR1 is 16 bits wide so it can measure 65536 "ticks", if you need more than that you need to use the prescaler at the cost of a drop in resolution but that doesn't sound like a problem right now.




Bookmarks