About Sigma-delta Analog to Digital Conversion
caskaz
Posts: 957
Hi.
I'm going to test "AN008: Sigma-delta Analog to Digital Conversion".
http://www.parallaxsemiconductor.com/an008
I did download "AN008 Sigma-delta ADC Conversion code (zip archive)".
I tested "appnote_adc_list1.spin".
I changed only 2-lines because characters on serial-terminal are no readable.
_clkmode = xtal1 + pll16x <-- _clkmode = xtal1 + pll8x
_xinfreq = 5_000_000 <-- _xinfreq = 10_000_000
I added 10kohmVR(0 - 3.3V) to "Analog Input".
But there is always "0" less than VR=1.45V.
There is always "512" more than VR=1.45V.
This is not converted from analog to digital.
I checked curcuit again and again. It's ok.
What is wrong?
I'm going to test "AN008: Sigma-delta Analog to Digital Conversion".
http://www.parallaxsemiconductor.com/an008
I did download "AN008 Sigma-delta ADC Conversion code (zip archive)".
I tested "appnote_adc_list1.spin".
I changed only 2-lines because characters on serial-terminal are no readable.
_clkmode = xtal1 + pll16x <-- _clkmode = xtal1 + pll8x
_xinfreq = 5_000_000 <-- _xinfreq = 10_000_000
I added 10kohmVR(0 - 3.3V) to "Analog Input".
But there is always "0" less than VR=1.45V.
There is always "512" more than VR=1.45V.
This is not converted from analog to digital.
I checked curcuit again and again. It's ok.
What is wrong?
Comments
You set up a circuit for Sigma-Delta A/D conversion. But you get a reading of 0 whenever your voltage is below 1.45V, and of 512 whenever it's above 1.45V. Is that correct?
Yes, I made same curcuit on document"AN008: Sigma-delta Analog to Digital Conversion"..
Value on terminal screen is "0" when VR-output is under 1.45V.
Value on terminal screen is "512" when VR-output is 1.45V to 3.3V.
I used the dual ADC object available here:
http://www.rayslogic.com/propeller/programming/adc.htm
It worked out of the box.
If it still fails what are the resistor/cap values you used?
Massimo
Also, you need to use small capacitor values, like 10 nF or so.
Double check that your feedback resistor is connected correctly.
Also, use values like 150k for the input resistor and 100k for the feedback resistor to start with.
I used INP_PIN=8,FB_PIN=9.
I tried NP_PIN=8,FB_PIN=10.
It seems trouble has gone.
maybe, my schmart-board's pin9 seems broken.
A/D value is from 140(VR=0v) to 470(VR=3.3V) at ADC_INTERVAL=512.
This value is normal?