Hello, I have MSP430F1232 ,28 PIN  microcontroller. I have 2 problem : 1- I want to read 2 analog input with msp430f1232 , A0 and A1 . I write the code blew to do that. My problem is I can not read two analog together  and I just read one analog A0. Please read my code and tell me what is wrong with my code.  2- I want to generate 1 KHZ pwm on P1.4 but I got 1 MHZ on P1.4 Please read the code below and help me. #include void main(void) {     //Define Analogs     //Analog A0--P2.0  A1--P2.1     WDTCTL = WDTPW | WDTHOLD;                               // Stop watch dog timer     ADC10CTL1 = INCH_1 + ADC10DIV_0 + CONSEQ_3 + SHS_0;     //ADC config.     ADC10CTL0 = ADC10SHT_2+ SREF_0 + ADC10ON + MSC;         //ADC config.     ADC10AE |= 0x03;                        // ADC option select     P2SEL |= 0x03;                   // P2.0 and P2.1 ADC option select     ADC10DTC1 = 2;     //Define digital inputs and outputs     P3DIR |= BIT3;      //Ready Green LED     P3OUT |= BIT3;      //Clear Ready     P3DIR |= BIT2;      //Over temp. LED     P3OUT |= BIT2;      //Clear Over temp.         //Define variabled     unsigned int adc[2];    //Analogs     //PWM generate on P1.4 Pin25      P1DIR |= BIT4;   //P1.4 set for output      P1SEL |= BIT4;  //Select TA0.1 output      CCR0 = 1000-1;   //PWM Time(1 KHz)      CCTL1 = OUTMOD_7;        CCR1 = 550-1;              // PWM Duty      TACTL = TASSEL_2 + MC_1;      //Main while          while(1)                    ADC10CTL0 &= ~ENC;          while (ADC10CTL1 & BUSY);          ADC10CTL0 |= ENC + ADC10SC;          ADC10SA = (unsigned int)adc;           if (adc[0]>230) P3OUT &= ~BIT3;             else P3OUT|= BIT3;    if (adc[1]>230) P3OUT &= ~BIT2;               else P3OUT|= BIT2;                              }                          }