Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Problem with analogRead

$
0
0

PS: resolved. I though that by default the internal vaoltage was regulated got to set analogReference to INTERNAL2V5. And the reading seems correct 3.56 from launchpad and 2.66 from the two 1.2 batteries.

 

Hi,

 

I tried to measure voltage with a voltage divider as shown there : http://www.microbuilder.eu/Tutorials/Fundamentals/MeasuringBatteryVoltage.aspx

 

I measured the voltage from the launch pad (VCC/Ground) when using A1 got 4.2V reading is 417 on A4 I got 3.3v reading is 327... which seems good. So I switched to batteries after having removed the jumper for VCC/TEST and RST, the RXD and TXD are set for hardware UART. The batteries are two 1.2V 2000mAh connected to the VCC and ground pin of the launchpad. The reading should have change for 2.4V. But the reading are still around 327 (3,3V). If I unplugged A4 pin i got readings between 400 and 500 mostly around 480.

 

What did i do wrong?

 

If somebody could help me.

 

Regards.


Viewing all articles
Browse latest Browse all 2077

Trending Articles