I'm posting this question as my results with the readadc10 on the 08M2 have been variable. In my circuit, I was measuring a voltage divider between a 5k pot and a 5k thermistor. When I turned the pot, the displayed value in debug did not change or it went to a random value.
Rather than speculating at this time on my setup, I'd like to hear from anyone who HAS achieved reliable results from readadc10. That's first.
Here is code for readadc10:
loop:
readadc10 4,w2
pause 500
debug w2
goto loop
Ok, Now about my circuit. Here are some items about adc which are not commonly known. I am in process of testing readadc10 with these items fixed:
MUST use a ground plane under all analog circuitry
MUST put .1 microfarad cap across V-GND pins on all analog chips
MUST use 10mF cap on power supply source
PREFER highpass/bandpass filtering on adc input.
The question is whether the picaxe adc is a toy or capable of reliable use - Some experts criictize mcu-internal adc as being too polluted by switching noise from digital circuits.
Overall, I am contemplating switching an led with a square wave and detecting with a photodiode.
jb
Rather than speculating at this time on my setup, I'd like to hear from anyone who HAS achieved reliable results from readadc10. That's first.
Here is code for readadc10:
loop:
readadc10 4,w2
pause 500
debug w2
goto loop
Ok, Now about my circuit. Here are some items about adc which are not commonly known. I am in process of testing readadc10 with these items fixed:
MUST use a ground plane under all analog circuitry
MUST put .1 microfarad cap across V-GND pins on all analog chips
MUST use 10mF cap on power supply source
PREFER highpass/bandpass filtering on adc input.
The question is whether the picaxe adc is a toy or capable of reliable use - Some experts criictize mcu-internal adc as being too polluted by switching noise from digital circuits.
Overall, I am contemplating switching an led with a square wave and detecting with a photodiode.
jb