CorB 64 Posted January 9, 2012 Share Posted January 9, 2012 Hi all, I have a very simple setup where I connect a resistor of 56k from VCC to P1.2 (G2231 chip) and a thermistor (380k at 15degrees) from P1.2 to GND. Theory predicts that at 15 degrees I should read 380/(380+56)*1024 = 892 on the ADC of channel_2. However I am not reading this type of values at all, the values I read are 984. The readouts are stable and react when I touch the thermistor. Here's the configuration of the ADC /* Configure ADC Channel */ ADC10CTL1 = INCH_2 + ADC10DIV_3 ; // Channel 2, ADC10CLK/4 ADC10CTL0 = SREF_0 + ADC10SHT_3 + ADC10ON + ADC10IE; //Vcc & Vss as reference ADC10AE0 |= BIT2; The G2231 is running on DCO at 1 Mhz. and this is inside a while (1) loop __delay_cycles(1000); // Wait for ADC Ref to settle ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start __bis_SR_register(CPUOFF + GIE); // LPM0 with interrupts enabled ADC10CTL0 &= ~ENC; value= ADC10MEM; Any idea where I should look for a solution ? regards Cor B The Netherlands Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.