Hi,
In my application iam sending the ADC voltages through UART communication, here the problem is, with out UART initialisation the ADC's perfectly working, but while initialising UART by default the ADC pins getting 3.2 Volts(VCC).
Can any one help me out , why these voltage are coming on those pins (A3,A6,A7) with UART initialisation.below is my UART initilisation code.
void serial_init()
{
P3SEL = 0x00; // configuring as GPIO pins
P3DIR = 0xFF;
P3SEL |= 0x30; // port3 4,5 are configured as uart
P3OUT = 0xc0; //
UCA0CTL1 |= UCSWRST;
BCSCTL1 = CALBC1_16MHZ;
DCOCTL = CALDCO_16MHZ;
BCSCTL1 |= XTS+XT2OFF; // set in high freq mode and Crystal2 Off
BCSCTL3 &= XCAP_0;
BCSCTL3 |= LFXT1S_2; // set for 3-16MHz crystal for high freq mode
UCA0CTL1 |= UCSSEL_2; // CLK = SMCLK
UCA0CTL0 = 0x00;
UCA0BR0 = 0x82; // 16MHz/9600 = 1666.6
UCA0BR1 = 0x06;
// UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3
UCA0MCTL = UCBRS0;
UCA0CTL1 &= ~UCSWRST;
}
here is ADC initialisation
ADC10CTL1 = CONSEQ_0;
ADC10CTL0 = SREF_0 + ADC10SHT_0 + ADC10ON;
ADC10AE0 = 0xFF;
under single channel and single conversion mode.
Thanks in Advance,
Regards
Manohar