Good evening all,
I am trying to get accurate ADC readings on an RF300PC1 on a proto board. I have a pullup resistor attached to Vcc, resistor/thermistor junction to GPIO3 (ADC input) and bottom end of the thermistor to Gnd. Since I got different readings when using the battery pack and the regulated 3.2v and I wanted the readings to be the same, I use this poke instruction, poke(-0xD1, 0x8), to set the ADC reference to Vdd. Doing that DOES keep the reading the same when using either power source but it is not what I expected.
I have the data sheet for the thermistor I am using so I figured at room temperature, I should get around 195, not the 90 I was getting. The pullup I am using is 470K because after doing some calculations, that is what I came up with to get the thermistor into the mid range of the ADC output. Since that gave me unexpected readings, I replaced the thermistor with another 470k resistor. I would think that would give me something close to the center of the 0-1023 range, approximately 512, but I am getting 262. Then to be sure the high valued resistors weren't the problem, I changed them to 2.2k and that gave me 259, not much change.
Does anyone have any suggestions as to why I don't get 512 when the input should be 1/2 Vcc?
Thanks very much!
I am trying to get accurate ADC readings on an RF300PC1 on a proto board. I have a pullup resistor attached to Vcc, resistor/thermistor junction to GPIO3 (ADC input) and bottom end of the thermistor to Gnd. Since I got different readings when using the battery pack and the regulated 3.2v and I wanted the readings to be the same, I use this poke instruction, poke(-0xD1, 0x8), to set the ADC reference to Vdd. Doing that DOES keep the reading the same when using either power source but it is not what I expected.
I have the data sheet for the thermistor I am using so I figured at room temperature, I should get around 195, not the 90 I was getting. The pullup I am using is 470K because after doing some calculations, that is what I came up with to get the thermistor into the mid range of the ADC output. Since that gave me unexpected readings, I replaced the thermistor with another 470k resistor. I would think that would give me something close to the center of the 0-1023 range, approximately 512, but I am getting 262. Then to be sure the high valued resistors weren't the problem, I changed them to 2.2k and that gave me 259, not much change.
Does anyone have any suggestions as to why I don't get 512 when the input should be 1/2 Vcc?
Thanks very much!
Comment