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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top