I'm still chasing this down, but maybe someone has some insight into this problem...(using PICBASIC PRO)
I am using 16F88 Timer2 interrupts to update seconds and minutes variables. I output the results every second on a LCD as MM:SS.
I am running 4MHz int clock, prescale of 1:1 and postscale of 1:16 with a loop in the Interrupt Service Routine to scale the number of ticks to get one second.
This all works fine with the LCD ticking off the seconds at the right rate.
I then added code to read out a DS18B20 temp sensor with the OWIN and OWOUT commands. Again the temp is output to the LCD and gives the right temps.
The problem is that when I'm reading out the DS18B20 the clock runs about 50% FASTER.
I code the ISR in pbp not asy. Have a DISABLE before the ISR code and ENABLE after it. I don't believe I have any other interrupts enabled (other than TIMER2) and check PIR1.1 at the start of the ISR to be sure I'm only servicing a Timer 2 interrupt.
Does OWIN or OWOUT mess with Timer2 or generate any interrupts?
Thanks
Bookmarks