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

adc

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



Joined: 15 Nov 2005
Posts: 2

View user's profile Send private message Visit poster's website AIM Address

adc
PostPosted: Tue Nov 15, 2005 3:17 pm     Reply with quote

Hello all,
Does anybody know the meaning of the mode option in the setup_adc() function?
It has options of ADC_OFF (obvious), ADC_CLOCK_DIV_2, ADC_CLOCK_DIV_8, ADC_CLOCK_INTERNAL, and such, but I am confused by what exactly this does for my ATD converter. It does not seem to be affecting my ATD. Maybe I am doing something wrong, I don't know.
Any help would be greatly appreciated.
Brad
_________________
C. Brad Doss
"Where does the light go when you turn the switch off?"
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 15, 2005 4:44 pm     Reply with quote

Quote:
Does anybody know the meaning of the mode option in the setup_adc() function?

Download the data sheet for the 16F877:
http://ww1.microchip.com/downloads/en/DeviceDoc/30292c.pdf
Look at Table 11-1 (page 117 in the Acrobat reader).
It shows a chart of A/D clock divisors, based on the PIC's crystal
frequency. These divisor values are reflected in the "mode" values
for the setup_adc() function.

Quote:
It does not seem to be affecting my ATD

Next, download the Reference Manual for the 10-bit A/D converter:
http://ww1.microchip.com/downloads/en/DeviceDoc/31023a.pdf
Look in this section on page 12:
"23.7.1 Faster Conversion -- Lower Resolution Trade-off"
This section explains how choosing the A/D clock divisor will affect
the accuracy and conversion time of the A/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