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

current analog input...

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



Joined: 27 Nov 2005
Posts: 29

View user's profile Send private message MSN Messenger

current analog input...
PostPosted: Wed Dec 28, 2005 7:47 pm     Reply with quote

can u guys help me how to program a current analog input which give an output to the lcd...? im using a PIC 16f877 with 4x20 LCD...
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Dec 28, 2005 8:04 pm     Reply with quote

Quote:
can u guys help me how to program a current analog input which give an output to the lcd..

Was this question answered by the code I posted at the end of this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=25488
crushneck



Joined: 27 Nov 2005
Posts: 29

View user's profile Send private message MSN Messenger

PostPosted: Thu Dec 29, 2005 12:09 am     Reply with quote

not exactly...what i meant is to get the current value instead of voltage...did u noe how??
or if its similar...can u tell me the formula to get the current input??
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

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

PostPosted: Thu Dec 29, 2005 1:11 am     Reply with quote

connect your current output to ground through a resistor and measure the voltage on the high sideof the resistor with the A/D. V=IR.
SherpaDoug



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

View user's profile Send private message

PostPosted: Thu Dec 29, 2005 8:12 am     Reply with quote

Check out the Maxim MAX471 and its app notes.
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1108
There is a wealth on information there.

In very basic terms you need the current to run through a shunt resistor which produces a very small voltage signal. Then you need to amplify the voltage to something the PIC A/D can use. You have to be careful what type of amplifier you use because the voltage to be measured is so close to the amplifier power supply voltage.
_________________
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