Almost blizzard conditions in my area today, so I spent a little time studying interrupts between snowplowing chores.
MCU =12F683
MPASM (Assembly)
I am interested in the External Interrupt and wonder what happens if the interrupt of an MCU (#1) , say from another MCU (#2), returns to an external event you are measuring with MCU#1 such that the measurement is screwed up (e.g., duty cycle).
I know I can turn off the interrupt enable bit during the measurement, but the main reason I don't want to do that is that the measurement is a continuous and slow process (about 20 mS). Results (4 bytes) from each measurement are stored for transmission to MCU#2 . I will be sending the stored data when MCU#2 says it is ready and don't mind losing some data that are in the process of being captured. I just don't want data that are potentially corrupted by the interrupt to be stored.
What happens if you clear the interrupt flag, reset GIE, and then just GOTO some defined place, like START? Since the PC was pushed onto the stack at interrupt but not popped, will I get a stack overflow error?
John
MCU =12F683
MPASM (Assembly)
I am interested in the External Interrupt and wonder what happens if the interrupt of an MCU (#1) , say from another MCU (#2), returns to an external event you are measuring with MCU#1 such that the measurement is screwed up (e.g., duty cycle).
I know I can turn off the interrupt enable bit during the measurement, but the main reason I don't want to do that is that the measurement is a continuous and slow process (about 20 mS). Results (4 bytes) from each measurement are stored for transmission to MCU#2 . I will be sending the stored data when MCU#2 says it is ready and don't mind losing some data that are in the process of being captured. I just don't want data that are potentially corrupted by the interrupt to be stored.
What happens if you clear the interrupt flag, reset GIE, and then just GOTO some defined place, like START? Since the PC was pushed onto the stack at interrupt but not popped, will I get a stack overflow error?
John