Just a final note... I estimate the Interrupt Handler to take less than 100uS to execute once every 10mS (with a 4MHz PIC). If your application still loses data, then there are only two options...
1. Go to a faster PIC
Naturally all the Interrupt timings will be shot and will have to be recalculated for a new value for TMR1Preset - but that's no big deal... should take less than a minute out of your life to do that...
2. Rehash the SetTimer and TickCount Subroutines
Rather than have one interrupt every 10mS, engaging TMR1's prescaler we have a potential interrupt range of 1uS through to 524.288mS... so we can redesign the routines to interrupt every 500mS (only 120 times in a minute) rather than every 10mS (6000 times in a Minute).
Melanie
Bookmarks