Hi
I am working on msp430g2231 and I have very less knowledge about it.
I have written a Code to test the working of ISR(interrupt sub routine) of timer_a.
But I think there is a problem and the program is unable to execute the sub routine.
The idea is to blink an LED(P1.0) upon button press(P1.3).(Note: blinking is just to check whether the program is executing the ISR or not?)
----------------------------
and
TACCTL0= CM_3 | CCIS_1 | SCS | CAP | CCIE;
Please tell me do we need to route the button with CCI0B externally or it is already routed???
Please follow the code below and help.
-----------------------------------------------------------------------------------------------------------------------------
#include "msp430g2231.h"
void main(void)
{
WDTCTL= WDTPW | WDTHOLD;
P1OUT = 0;
P1DIR = 0x01;
P1SEL = BIT3;
TACCTL0= CM_3 | CCIS_1 | SCS | CAP | CCIE;
TACTL = TASSEL_2 | ID_3 | MC_2 | TACLR;
for ( ;;)
{
__low_power_mode_3();
}
}
# pragma vector = TIMERA0_VECTOR
__interrupt void TIMERA0_ISR (void)
{
P1OUT=0x01;
}