Hello,
is there a way to use modules Timer and ISRRX in the same code ?
The problem is to read the USART while running a state display routine cyclically called by timer.
Thanks.
Use ISRRX and ISRTimer in the same program
Moderators: David Barker, Jerry Messina
-
- Swordfish Developer
- Posts: 1469
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: Use ISRRX and ISRTimer in the same program
The easiest way is to use different interrupt priorities for the two modules.
By default, they both use the same priority (ipHigh). By changing the timer to use the low-priority interrupt, the USART will be able to interrupt it.
By default, they both use the same priority (ipHigh). By changing the timer to use the low-priority interrupt, the USART will be able to interrupt it.
Code: Select all
#option RX_PRIORITY = ipHigh
#option TIMER_PRIORITY = ipLow
include "ISRRX.bas"
include "ISRTimer.bas"
Re: Use ISRRX and ISRTimer in the same program
Plain and simple .