CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

AD7705 reading problems

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
assaad



Joined: 09 Dec 2009
Posts: 37

View user's profile Send private message

AD7705 reading problems
PostPosted: Mon Jun 06, 2011 9:35 am     Reply with quote

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: 19535

View user's profile Send private message

PostPosted: Mon Jun 06, 2011 9:46 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jun 07, 2011 1:16 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group