Those A/D statements are in the Main Loop, they will not have any affect on the interrupts.
However, you haven't initialized the NextChan variable before starting. It may take several thousand readings from invalid channels before falling back into line when it rolls over.
But much like the RX handler, you may not have included that part of the program.
Does that mean it's counting at 1 second intervals now?That works better.
If so, then the problem is in your RX handler. If you have a Timeout value in the HSERIN statement, it sits in the interrupt until it either receives ALL the data, or it times out. Or if there's no timeout, it simply waits until it's received enough data before returning.
If that handler is a High Priority interrupt, then no other interrupts can occur until it's returned from that handler. Timer1 would then probably miss many interrupts.
By making the RX handler a Low Priority interrupt, it allows the (high priority) TMR1_INT to continue on without conflict.
<br>
Bookmarks