TMR0 to interrups every 1msec
i am using darrel's interrupts and 20MHz crystal. With mister_e calculator i found that i want prescaler 1:32 and preload 99 into tmr0.I don't know how to preload the value into timer.below i have the interrupt routine of my program. Is this correct for preload the value?
'---[TMR0 - interrupt handler]--------------------------------------------------
Tick0: ;every 1ms occurs
;make space for new sample
cp_old=cp_new ;save old value
cp_new.highbyte=CCPR1H ;take new capture
cp_new.lowbyte=CCPR1L
gosub samplebit ;take the sample bit
TMR0=99
@ INT_RETURN
thanks