Few things that took me a while to figure out:

1. When using high and low priority interrupts, GIEH must ALSO be enabled along with GIEL (bits 7 and 6) for low priority interrupts to occur.

2. Even when interrupts are not enabled (such as external interrupts on INT0), these are still being flagged. Thus, if there are multiple sources of interrupts and if the interrupt source checking is not handled carefully, disabled interrupt routines may still occur. For example, in my case:
btfsc INTCON,TMR0IF
call TmrInt
btfsc INTCON3, INT1IF
call KeyInt

The above code caused KeyInt routine to be called even when the interrupt was through the timer.

Views: 226

Comment

You need to be a member of Personal Mechatronics Lab to add comments!

Join Personal Mechatronics Lab

© 2024   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service