Hi,
Which device are you using?
I'm not sure you can access the full TMR1 register pair in one go - even with RD16 enabled. On some devices the 16bit timers are buffered and you need to read the two bytes in the correct order or you'll get the wrong result. On the other hand, you're saying that you can measure and display the period with this very method which I find a bit strange.
You could try something like/Henrik.Code:DISABLE intblock: INTF=0 'RB0/INT FLG T1CON.0 = 1 'Start timer 1 WHILE INTF=0 @ NOP wend T1CON.0 = 0 'Stop timer 1 time.lowbyte = TMR1L time.highbyte = TMR1H rpm=6000*/10000 rpm=div32 time TMR1L = 0 ' Clear TMR1 so it's ready for next round. TMR1H = 0





Bookmarks