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

help needed on PIC16F877A !!!!

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



Joined: 12 Mar 2009
Posts: 2

View user's profile Send private message

help needed on PIC16F877A !!!!
PostPosted: Thu Mar 12, 2009 7:06 am     Reply with quote

Hi there,

I need help in writing a program base on C to measure the voltage entering the PIC.
How do I go about to write the program and convert the analog signal to a digital.

Thanks in advance for the help...
Armer175



Joined: 13 Jan 2009
Posts: 12

View user's profile Send private message

PostPosted: Thu Mar 12, 2009 7:20 am     Reply with quote

You need to search around the forum and then post a program you at least attempted to start by yourself. I know there are plenty of examples of A2D too.

From what I found here most of the people here don't like it when it seems like you want them to write the code for you. Just my advice for the future.

Good Luck! Smile
dem



Joined: 12 Mar 2009
Posts: 2

View user's profile Send private message

PostPosted: Thu Mar 12, 2009 7:32 am     Reply with quote

Thanks for the tip. My bad.
Actually I got another question. As I am dealing with leakage current here and there is a positive and neagative voltage, I was wondering do I need an additional hardware to manipulate the reference level into the positive region or the PIC can be programmed to do so.
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Thu Mar 12, 2009 8:29 am     Reply with quote

You'll never be able to measure a negative voltage directly. Yes, you must convert it to somewhere within the power supply range of the PIC. That probably means an op-amp circuit. Possibly you could do it with a passive network (i.e. resistors).

If "measure the voltage entering the PIC" means measuring the PIC's power supply voltage, then I'm afraid that's another thing you can't do directly. What you'd need to do would be to use some very precise voltage standard as a reference for your A/D measurements.

Details of the hardware features of the processor are on the Microchip website.
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