Mordred wrote:
Does the nano18 have usable timers that I can use to record event timing?
The syntax manual posted on this forum on the nano18 does not mention them?
essentially I need to setup a m\s timer.
I would like to use tmr1h:tmr1l internal, however even though I can see the registers I am unsure how to set it up to start and stop that timer and to set it to overflow at 2000 clock pulses (which acording to the syntax manual would be = to 1 ms) then use this to trigger a counter increase. I tried the example posted on a previous post however I could not get that example to work
tmr1h var byte
tmr1l var byte
Timer1 var word ; 16-bit variable created
Timer1.highbyte = TMR1H ; high byte of Timer1 is now TMR1's high-register, TMR1H
Timer1.lowbyte =TMR1L ; low byte of Timer1 is now TMR1's low-register, TMR1L
if timer1 = 2000 then
counter = counter+1
endif