In what way is the value shown on the serial monitor "wrong"?!?
You are setting bit 5 of the control register which turns off the internal 2.5V analog reference but you show nothing connected to the reference pin.
"The control register on the AD7887 is an 8-bit, write-only register. Data is loaded from the DIN pin of the AD7887 on the rising edge of SCLK. The data is transferred on the DIN line at the same time as the conversion result is read from the part. "
You are not capturing the 8 bits returned from the ADC at the same time you send the value 32 to the control register. Try:
I want to values,??displayed on the serial monitor,change by turning the potentiometer in a range of 0 to 4096,but using my code there is only the maximum and a minimum value around 768 or 1024,instead using your code there is only a maximum value of 255 and a minimum value of 32...
I set bit 5 to zero to avoid activating Vref,it's true ?
I don't understand why the values ??aren't right.....help me!!
thanks
Hi, I would like to know if you could figure out what was the problem here, I am going to use the same ADC and I m not sure how to connect it with my arduino UNO.