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 support@ccsinfo.com

16F877A with ADC function, how??

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







16F877A with ADC function, how??
PostPosted: Sun Mar 16, 2003 8:22 am     Reply with quote

Hi there,

I never played with 16F877A, and its adc function.Now i should measure voltage between -5V and +5V.I need to use all 8ch for my project.I saw +Vref and -Vref is also analog channels.How will i use them both Vref and adc channel? Is there any project created with ccs? I can't find any sample codes and projects about this simple project? Can you advice me something?? Thanks.

No_Fear
___________________________
This message was ported from CCS's old forum
Original Post ID: 12739
R.J.Hamlett
Guest







Re: 16F877A with ADC function, how??
PostPosted: Sun Mar 16, 2003 11:42 am     Reply with quote

:=Hi there,
:=
:=I never played with 16F877A, and its adc function.Now i should measure voltage between -5V and +5V.I need to use all 8ch for my project.I saw +Vref and -Vref is also analog channels.How will i use them both Vref and adc channel? Is there any project created with ccs? I can't find any sample codes and projects about this simple project? Can you advice me something?? Thanks.
:=
You will have to scale your input voltage to be between 0v, and 5v. A simple op-amp 'adder', with 5v as the second input, combined with a division by two, will give you a signal where -5v, arrives at the PIC as 0v, and +5v, arrives as 5v. You cannot use the pins as signal inputs, and as voltage reference inputs, but even if you could, you would still need to use the op-amp offset, since the refernce inputs, cannot go to -5v. The input range for all the PIC pins, is only 0.3v, each side beyond the incoming supply voltage.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 12745
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