Hello everyone,
I am trying to make a portable blood pressure monitor with MSP430F2274. In addition to measuring blood pressure, the device is supposed to store the blood pressures along with the time the measurement is taken.
On port 2, i have four buttons interfaced on p2.0 to p2.3. all the buttons generate interrupts to wake up the CPU from LPM3.
I have the following problem in running the test code:
on pressing any of the four buttons, the code is entering the PORT2_ISR, but the code is not detecting which button is pressed. I have used a simple switch case statement on P2IFG, but when I tried to debug, i found that P2IFG reset after entering the ISR.
What can be done to detect which of the four buttons is pressed?
I am using IAR embedded workbench platform and am programming in C language.
Your suggestions will be really helpful.