On Tuesday 18 March 2003 06:59 pm, Jai Dhar wrote: > my problem (finally) is that the > time between the first half interrupt and second half interrupt > aren't even.. they vary by one instruction cycle... and this is > because of the check for the flag. If I remove that check, it > interrupts every 500mS as it should (I am checking all this with > the stopwatch in MPSIM Btw) I seem to recall someone complaining about the same thing with MPSIM and hearing from Microchip that there was a timing bug. The timer itself will generate periodic interrupts reliably, though latency may vary depending on what's being done at the time (i.e. whether you're inside a 2-cycle instruction or not when the interrupt fires). -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads