ADC Codes

Thread Starter

honeymustard909

Joined Jul 27, 2011
3
Hi there ,

I was wondering if any of u guys are familiar with ADC programming . I am currently using a Pic 18f46k20 . My project involves measuring my battery voltage where when it reaches a certain level , the PIC recognizes it and turn on the charging circuit for the battery. I am having a 12V power supply. I have scaled down the voltage from 12v to 3v using a voltage divider circuit but i am not sure on the ADC conversion part. I would be really grateful if anyone decided to help out. Thank u
 

blah2222

Joined May 3, 2010
582
I'd recommend using a voltage regulator rather than a simple voltage divider circuit for bringing down the voltage as the rest of your circuit that you would like to power may affect the voltage it receives.
 

strantor

Joined Oct 3, 2010
6,798
I'd recommend using a voltage regulator rather than a simple voltage divider circuit for bringing down the voltage as the rest of your circuit that you would like to power may affect the voltage it receives.
I think OP is talking about the analog input being scaled down. So, if the battery is at 6V, the analog input will be 1.5V, etc.
 
Top