Question
Assume that for a PIC24FJ64GA002 the pin for CN13/RB13 has a pushbutton switch connected to it and the change notication interrupt for RB13 is enabled.
Assume that for a PIC24FJ64GA002 the pin for CN13/RB13 has a pushbutton switch connected to it and the change notication interrupt for RB13 is enabled. For the following code snippet, how many times does the CNInterrupt ISR execute if the pushbutton is presses and released one time? Assume no switch bounce and explain your answer. The ISR is void _ISR _CNInterrupt(void) { DISABLE_RB13_CN_INTERRUPT(); // _CN13IE = 0; _CNIF = 0; } The main routine is int main(void){ CONFIG_RB13_AS_DIG_INPUT(); ENABLE_RB13_CN_INTERRUPT(); // _CN13IE = 1; _CNIF = 0; _CNIP = 2; _CNIE = 1; while(1); // forever loop }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started