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.

msp430f4270 adc problem

Other Parts Discussed in Thread: MSP430F4270

i am useiing msp430f4270 when i meassure count at once it is positive value. when i meassure second time its negative value and very high. i join one npn transistor at a4 channel.time duration between to meassurement is 5 sec.code setting is same 

code

unsigned int sample;
sample=0; // Use volatile to prevent removal
input=0;
SD16MEM0=0;
SD16INCTL0 = SD16INCH_4; //J Type TC
SD16AE = SD16AE2 + SD16AE3;
SD16CTL = SD16REFON + SD16SSEL0 + SD16DIV0 + SD16DIV1; // 1.2V ref, SMCLK
SD16CCTL0 |= SD16SNGL + SD16UNI; // Single conv
for (i = 0; i < 0x3000; i++); // Delay for 1.2V ref startup

adc3: SD16CCTL0 |= SD16SC; // Set bit to start conversion
while ((SD16CCTL0 & SD16IFG)==0); // Poll interrupt flag
results = SD16MEM0; // Save CH0 results (clears IFG)
if(sample<20)
{
input=input+(results/20);
sample++;
goto adc3;
}

input=(double)(0.00915*(input-187));

so please give me guidence i think there is defferance but i am gatting is very high and opposite sign.

**Attention** This is a public forum