Other Parts Discussed in Thread: MSP430F5328
Hi, i have been working with MSP430f5328, and am trying to use ADC12,when running the program the registers have their correct values but when connecting the analog signal (P6.1) nothing happen
any one have any idea !!!
here is the code
#include <msp430.h>
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= BIT0;
P6SEL |= BIT1;
REFCTL0 &= ~REFMSTR;
ADC12CTL0 &= ~ADC12ENC;
ADC12CTL0 |= ADC12ON+ADC12SHT0_11+ADC12REFON+ADC12REF2_5V;
ADC12CTL1 |= ADC12CSTARTADD_1+ADC12SSEL_3;
ADC12MCTL0 |= ADC12INCH_1+ADC12SREF0;
__delay_cycles(30);
ADC12CTL0 |= ADC12ENC;
while (1)
{
ADC12CTL0 |= ADC12SC;
__delay_cycles(30);
}
return 0;
}