This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

REGARDING Interrupt programming

Other Parts Discussed in Thread: MSP430G2231

I was performing interrupt programming on msp430 G2231 and my program regarding this was

#include <msp430.h>
#include "msp430g2231.h"
//Global Variable
unsigned int AdcData[2] ;                 // Store results A1,A0
unsigned int Current ;         // store value from P1.0
unsigned int Voltage ;         // store value from P1.1
void main (void)
{
  WDTCTL = WDTPW + WDTHOLD;   // Stop WDT
  BCSCTL1 = CALBC1_1MHZ;   // Set range
  DCOCTL = CALDCO_1MHZ;      // SMCLK = DCO = 1MHz
  ADC10CTL1 = INCH_1 + CONSEQ_1;            // A1/A0, single sequence
  ADC10CTL0 = ADC10SHT_2 + MSC + ADC10ON + ADC10IE;
  ADC10DTC1 = 0x02;                         // 2 conversions
  ADC10AE0 |= 0x03;                         // P1.1,0 ADC10 option select
  P1DIR |= BIT2;                            // P1.2 = output
  P1SEL |= BIT2;                            // P1.2 = TA1 output
  TACCR0 = 1024-1;                          // PWM Period
  TACCTL1 = OUTMOD_7;                       // TACCR1 reset/set
  AdcData[0]=32;
  AdcData[1]=16;
  Voltage = AdcData[0];
  Current = AdcData[1];
  TACCR1 = (Voltage*0.04)*(Current*0.05);         // TACCR1 PWM Duty Cycle
  TACTL = TASSEL_2 + MC_1;                  // SMCLK, upmode
  for (;;)
 {
   ADC10CTL0 &= ~ENC;
   while (ADC10CTL1 & BUSY);                 // Wait if ADC10 core is active
     ADC10SA = 0x200;                        // Data buffer start
     P1OUT |= 0x01;                          // Set P1.0 LED on
     ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start
     __bis_SR_register(CPUOFF + GIE);        // LPM0, ADC10_ISR will force exit
     P1OUT &= ~0x01;                         // Clear P1.0 LED off
  }
 }
// ADC10 interrupt service routine
#pragma vector=ADC10_VECTOR
__interrupt void ADC10_ISR(void)
{
  __bic_SR_register_on_exit(LPM0_bits);     // Exit LPM0
}

please send me relevant answer regarding my problem

**Attention** This is a public forum