View previous topic :: View next topic |
Author |
Message |
assaad
Joined: 09 Dec 2009 Posts: 37
|
AD7705 reading problems |
Posted: Mon Jun 06, 2011 9:35 am |
|
|
Hello everyone
I have connected REF+ to 2.5V
REF- to gnd
AN2- to gnd
Then on AN2+ I put voltage from 0 to 2.5 that through a POT.
So when the voltage on AN2+ is 2.5v I should get a reading of 0xFFFF. But I get about 0x5555, which is it 0xffff/3
Do I have anything wrong with the connections?
My setting of ad7705 is
Code: | setup_adc_device( ADC_SELF, ADC_GAIN_1, ADC_UNIPOLAR, ADC_50);
|
Thank you |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Mon Jun 06, 2011 9:46 am |
|
|
Tell us a lot more.
What PIC are you using?.
What connections for DRDY, DO, DI, RESET, CS and CLK?.
You have the required crystal?.
You are initialising the lines as in adc_init, except for the change to unipolar?.
Best Wishes |
|
|
assaad
Joined: 09 Dec 2009 Posts: 37
|
|
Posted: Tue Jun 07, 2011 1:16 am |
|
|
Thank you Ttelmah
The problem is solved.
Before using this setup, I should choose the correct channel in the communication register.
Code: |
setup_adc_device( ADC_SELF, ADC_GAIN_1, ADC_UNIPOLAR, ADC_50); |
:D |
|
|
|