I'm working on this and a bit confused by the 12F683 data sheet.
I don't want an interrupt (i.e. jump to some assembly level routine) I'm just polling the TMR1 overflow flag.
Code:
if PIR1.0 = 1 then T1Handler 'If Timer1 has overflowed then
So do i need to do the stuff below?
The Timer1 register pair (TMR1H:TMR1L) increments
to FFFFh and rolls over to 0000h. When Timer1 rolls
over, the Timer1 interrupt flag bit of the PIR1 register is
set. To enable the interrupt on rollover, you must set
these bits:
• Timer1 interrupt enable bit of the PIE1 register
• PEIE bit of the INTCON register
• GIE bit of the INTCON register
The interrupt is cleared by clearing the TMR1IF bit in
the Interrupt Service Routine.
I just want to clear the TMR1 overflow flag every time it overflows, load my 250ms preload value etc and carry on.
Bookmarks