View previous topic :: View next topic |
Author |
Message |
memoally
Joined: 25 Jan 2010 Posts: 35
|
Can I read analog 9 volts via analog pins? |
Posted: Fri Feb 26, 2010 3:20 pm |
|
|
Can I read analog 9 volts via analog pins? Should I set Vref high and low values to 9 and 0, respectively ? Also I wonder, if I give 9 volts to an analog pin for adc, would I damage or burn pic ? I use pic 16f876. _________________ compiler version: 4.105
pic: 16f876
clock frequency: 4MHz |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Fri Feb 26, 2010 3:57 pm |
|
|
Quote: | Also I wonder, if I give 9 volts to an analog pin for adc, would I damage or burn pic ? |
Exactly! If you don't need to to know more about the difference between damage and burn, just let it be.
Use a voltage divider to keep the specified PIC voltage rating. You may want to consult the datasheet for details. |
|
![](templates/subSilver/images/spacer.gif) |
memoally
Joined: 25 Jan 2010 Posts: 35
|
|
Posted: Fri Feb 26, 2010 4:08 pm |
|
|
But I dont want to lose power on voltage divider, because I use a battery and power lost (the power across pot or resistor, whatever) shortens my battery's life. I want to measure a battery of 9 volts. How can I do that? _________________ compiler version: 4.105
pic: 16f876
clock frequency: 4MHz |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
![](templates/subSilver/images/spacer.gif) |
memoally
Joined: 25 Jan 2010 Posts: 35
|
|
Posted: Fri Feb 26, 2010 4:45 pm |
|
|
Thank you pcm programmer, if I can't understand any point, I will ask it from here. _________________ compiler version: 4.105
pic: 16f876
clock frequency: 4MHz |
|
![](templates/subSilver/images/spacer.gif) |
|