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

Need suggestion about adc

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



Joined: 04 Oct 2010
Posts: 53
Location: Dhaka

View user's profile Send private message Send e-mail

Need suggestion about adc
PostPosted: Tue Dec 14, 2010 11:41 pm     Reply with quote

Hi, now I'm working with 18f4550.
I want to read 3 analog voltages from 3 different source, reference to 5 volt.

I'm trying to connect

RA0 with sensing point1 with 100k to ground
RA1 with sensing point2 with 100k to ground
RA3 with sensing point3 with 100k to ground

Usually I do that in ATMEL IC

and I command it showing here

set adc channel 1 ->start conversion->usedelay->read
set adc channel 2 ->start conversion->usedelay->read
set adc channel 3 ->start conversion->usedelay->read


I'm usually familiar with Atmel IC.
I did it that way.

But now in PIC I see that there's a problem with that procedure.

I found clamsy type data.
If anyone have suggestion on reading multiple analog voltage from different pin please suggect me to do that in your right way.

Again thanking you
Misel0019
misel0019



Joined: 04 Oct 2010
Posts: 53
Location: Dhaka

View user's profile Send private message Send e-mail

reply
PostPosted: Wed Dec 15, 2010 12:21 am     Reply with quote

Hurrah I have done it on Proteus, now I'm working on real board.

And hoping everything will be as I expected.
Regards
Misel
SherpaDoug



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

View user's profile Send private message

PostPosted: Wed Dec 15, 2010 8:54 am     Reply with quote

I'm glad things seem to be working for you. But I should point out that you need a delay between setting the A/D channel and starting the A/D conversion. The PIC needs time for the multiplexer to charge the capacitance of the A/D input. You will have to read the data sheet to see how much time, but it is usually about 20 or 30us. If the time is too short your readings on one channel will be influenced by the other channels.
_________________
The search for better is endless. Instead simply find very good and get the job done.
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