I'm just testing using a 18M2 to read voltages using its internal 1.024V reference as vref+.
The test circuit is an axe091 and I've used a 1K resistor from the pot to the chip's input pin and 0.47uF capacitor from the pin to ground as a noise filter. Testing the input to the chip with an oscilloscope the input looks absolutely clean.
Program is
Note I've put delays both before and after the sertxd to ensure this shouldn't effect the measurement. I've tried the picaxe at various clock speeds with no change. My input voltage is .982V which should of course give an ADC reading of 982 whereas I'm getting numbers varying from 975-981 with an average of about 979.
Obviously the intention of using the internal reference is to increase the sensitivity of the measurement for a voltage in the range 0-1.024V but given the noise I might as well be using VCC (5.01V on my AXE091) as the reference when I see a rock solid measurement of 200 which is exactly what I would expect from my input (.982/5.01*1024 =200.7).
Any ideas?
Thanks
Peter
The test circuit is an axe091 and I've used a 1K resistor from the pot to the chip's input pin and 0.47uF capacitor from the pin to ground as a noise filter. Testing the input to the chip with an oscilloscope the input looks absolutely clean.
Program is
Code:
#picaxe 18M2
setfreq M8
fvrsetup FVR1024 ; set FVR as 1.024V
adcconfig %011 ; set FVR as ADC Vref+, 0V Vref-
do
readadc10 B.4,w0
pause 1000
sertxd (#w0,13,10)
pause 1000
loop
Obviously the intention of using the internal reference is to increase the sensitivity of the measurement for a voltage in the range 0-1.024V but given the noise I might as well be using VCC (5.01V on my AXE091) as the reference when I see a rock solid measurement of 200 which is exactly what I would expect from my input (.982/5.01*1024 =200.7).
Any ideas?
Thanks
Peter