"Larry Bradley" wrote: > I presume that I could disable interrupts before doing the I/O, > and turn them on after. In this case, I think that the timer1 > counter would contain a number equal to the number of instruction > cycles taken by the LCD routine. Since I have to preload the > counter in the interrupt routine anyhow, in order to get an > interrupt every 10 msecs, I think I can compute a new preload based > on the existing counter, so the next timer cycle will be shorter, > to compensate for the time lost in the LCD routine. > > This is my first time experimenting with timers and interrupts. Is > what I'm proposing a good way to do this? Yes, that's a good way. In practice, you "compute a new preload based on the existing counter" by replacing your current MOVWF TIMER1 with ADDWF TIMER1. -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu