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 input

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







adc input
PostPosted: Mon Jul 12, 2004 8:54 am     Reply with quote

hi,
I'm very newbie with pics. I need to make a conversion from an analog input; i've easily done it with a test signal whose range was 0-5 volts, but for the real application the input will be around 100 mV. I guess i'll need to change some settings,but i don't know what i should do and how.
Hope somebody could help me,
tanx
rino
dbotkin



Joined: 08 Sep 2003
Posts: 197
Location: Omaha NE USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jul 12, 2004 9:22 am     Reply with quote

Well, partly it depends on the resolution you need. You could just multiply the ADC reading by, say, 50 if you don't need precise readings.

With Vref = Vdd = 5.0V, you will get ADC readings from 0 to 20 or 21.

With Vref = Vdd = 3.0V, you will get 0 to 34 or so.

With Vref = 2.5V, you'll get 0 to 41 or so.

You can use an op-amp to amplify your input signal for better resolution. You'll need to watch out for noise, proper grounding and all that, and may need some software filtering if the input is noisy or unstable.

It would help some to know what your requirements are - resolution, accuracy, that sort of thing.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Jul 12, 2004 9:35 am     Reply with quote

You need an amplifier to bring your 100mV signal up to 5V, that is a gain of fifty. You could try to do the gain in software by just multiplying by 50 but you would loose about 6 bits of resolution. It is better done in hardware.

Look for information on "op amps" and "instrumentation amps"
_________________
The search for better is endless. Instead simply find very good and get the job done.
Guest








PostPosted: Mon Jul 12, 2004 9:55 am     Reply with quote

if the only way to avoid the amp means losing 6 bits, i think i'll buy the amp and check the noise.
thank you very much
rino
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