Hi all
Datasheet says TMR0 rolls over from FFh to 00h to generate T0IF flag.
I want to read the TMR0 register. I want to read d’16’ is available in TMR0.
Is the above code correct or do I have to subtract from 256?
Because datasheet says TMR0 counts from FFh to 00h.
Datasheet says TMR0 rolls over from FFh to 00h to generate T0IF flag.
I want to read the TMR0 register. I want to read d’16’ is available in TMR0.
Code:
movf TMR0,W
xorlw d'16'
btfss STATUS,Z
goto Exit
movwf Result
Is the above code correct or do I have to subtract from 256?
Because datasheet says TMR0 counts from FFh to 00h.