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

Problem with multiple ADC channels
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rayleight
Guest







PostPosted: Tue Dec 15, 2009 10:17 pm     Reply with quote

Thanks. I do check the datasheet, but I don't really get it.
Now only I understand.
Could anyone suggest any PIC which can read multiple PIC at the same time?? 40 pin PIC.

But IF I do want to continue using 16f877a, can I use these:
Quote:

Do it like this:

"set_adc_channel(x)"

1. Set the desired channel.
2. Wait for 20 us.
3. Read the ADC.
4. Do the calculations.
5. Display the result.

The same steps are required for each channel.
Do it in a for(;;) loop.
dyeatman



Joined: 06 Sep 2003
Posts: 1985
Location: Norman, OK

View user's profile Send private message

PostPosted: Tue Dec 15, 2009 10:34 pm     Reply with quote

Yes, just as it is shown earlier in this thread:

Code:

   set_adc_channel(x);
   delay_us(20);
   adc_value = read_adc();
 

_________________
Google and Forum Search are some of your best tools
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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