Arduino Due ADC problem


#1

Hi,
I am experiencing a problem where adc.read(A0) returns 512 with the A0 pin shorted to analog ground.
If I re-virtualize the Due and re-load the app then the ADC reading is zero.
To test operation I used the example “ADC Analog to Digital Acquisition Basics”
If I connect a 10k pot between 3.3v and analog ground with the slider connected to A0 then on a freshly virtulaized device the adc reading is zero with the pot at ground then as the voltage is increase the adc value suddeny jumps to 512. The ADC then works correctly between 512 and 4095 but will not drop below 512.

I have used the Arduino “AnalogReadSerial” sketch with analogReadResolution(12) and I get a smooth change in ADC value from 0-4095 as the pot is varied.

Is this a driver problem???
Any suggestions appreciated
Thanks.


#2

Update. Flashed the Due with flip n click Due VM and the ADC now reads 512 - 1024. Is there a different Vref between these boards?