Hello Sir Thanks for replaying, Below are the register configuration for ADC10 ADC10CTL0 = SREF_0 | ADC10SHT_0 | REFON; ADC10CTL1 = 0x0000; // channel 0 ADC10AE0 = 0x01; ADC10CTL0 |= ADC10ON; ADC10CTL0 |= ENC; for ( ; ; ) { result = 0; P2OUT |= 0x10; ADC10CTL0 |= ADC10SC; while ( ADC10CTL1 & ADC10BUSY ) ; P2OUT &= ~0x10; result = ADC10MEM; ADC10CTL1 &= ~ADC10BUSY; printf ( "%u\n", result ); }
↧