Pregunta

I am coding a program for PIC16F84A in assembly, When an interrupt A occurs and the interrupt routine of A begins the GIE gets set to 0, if while we are in the A interrupt subroutine another interrupt B is triggered the program will continue in A's subroutine because GIE is not enabled (won't jump to 0x04), but since the Enable of B is set will the flag of B get set anyway? So do I need to make sure that all flags are set back to 0 before RETFIE or only reset A's flag to 0?

¿Fue útil?

Solución

When an interrupt A occurs and the interrupt routine of A begins the GIE gets set to 0, if while we are in the A interrupt subroutine another interrupt B is triggered the program will continue in A's subroutine because GIE is not enabled

Why are you turning GIE off in the interrupt handler?
An interrupt will not interrupt an interrupt handler. Interrupt B handler will start when you return from interrupt handler A

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top