[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
при чем.
For the PIC16C71/73/73 only:
If an interrupt occurs while the GIE (Global Interrupt Enable) bit is being cleared, the GIE bit may unintentionally be re-enabled by the user's Interrupt Service Routine (the RETFIE instruction). The events that would cause this to occur are :
1) An instruction clears the GIE bit while an interrupt is achnowledged
2) The program branches to the Interrupt vector and executes the Interrupt Service Routine
3)The Interrupt Service Routine completes with the execution of the RETFIE instruction. This causes the GIE bit to be set (enables interrupts), and the program returns to the instruction after the one which was meant to disable interrupts.
Perform the following to ensure that interrupts are globally disabled :
LOOP BCF INTCON, GIE
BTFSC INTCON, GIE
GOTO LOOP
E-mail: info@telesys.ru