Hi,
I would prefer using interrupts.
Your TIMER_ZERO is already a word variable. So on a timer zero interrupt you can just increment the HighByte of the variable and normally dump the TMR0 to the lowbyte. This would make a pseudo 16bit timer. On a comparator interrupt, get the readings. It should not be very difficult in ASM . By the way what is your clock frequency and your timer0 prescaler value ? If you are using a high prescale then Darrel's Instant Interrupt may work.
Bookmarks