PDA

View Full Version : AD7705 is 15bit or 16bit ADC



ravindrajoga
- 13th July 2007, 10:14
AD7705 - 16 bit ADC with PIC16F4525

Problems faced during interfacing AD7705
I am using channel 1 for weighing scale application.
I have connected an amplifier to the Weighing scale which gives me a voltage
output of 0 to 5V.
The hardware details are as below.
XTAL =2.4576.
AIN1+ = amplifier output and AIN1- = Ground
VCC = 5V VREF+ = 2.5V VREF- = 0;

My initialisation sequence as given below:

init adc channel as Mater SPI 3 wire bus communication.
write_byte( 0x20 );//Communications Register set to write of clock register
write_byte( 0x04 );//Clock Register info here
write_byte( 0x10 );//Communications Register set to write of setup register
calibration = ADC_SELF, Gain = Unity Input = BIPOLAR and rate of ADC_50(0x04)
setup_adc_device(ADC_SELF,ADC_GAIN_1,ADC_BIPOLAR,A DC_50);
then read the ADC by
write_byte(0x38);
wait for DRDY

read channel -> UpperByte First as first byte and LowerByte as second byte
ADC_READ = ((UpperByte&0x00FF)<<8) | (LowerByte&0x00FF);

As per the datasheet AIN1+ = AIN1- then adc value read from AD7705 should
be 0x0000. ie. at 0V it should be 0x0000. but currently I am reading a
value of 0x8000. Any input voltage in the negetive region is not being read
and is getting loaded.

As per datasheet the range is from -VREF/GAIN to +VREF/GAIN in bipolar mode
ie. I suppose should be from -2.5V to +2.5V in this case but actually any
voltage below zero is not being measured. At 0V it is 0x8000 and at 2.5V(+VREF) it is 0xFFFF. That is actually I am able to read only the +ve voltages and only 15 bits of data.ie. samples of 32767 are readable as against 64535 counts as per the data sheet.

Please help me in solving this problem.


Anybody who knows the details may please help in solving and using it as a true 16 bit ADC.

Darrel Taylor
- 13th July 2007, 14:09
write_byte( 0x10 );//Communications Register set to write of setup register
calibration = ADC_SELF, Gain = Unity Input = BIPOLAR and rate of ADC_50(0x04)
setup_adc_device(ADC_SELF,ADC_GAIN_1,ADC_BIPOLAR,A DC_50);
then read the ADC by

It's hard to tell, cause it's a mix of code and suedo code.
But if the 0x04 (shown in red) is what's being sent to the Setup Register, then the device will be in Unipolar mode, instead of Bipolar like the comments say.

But you may get a better answer from a different forum.
We do mostly PicBasic Pro here.

hth,