Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: How to monitor battery voltage for MSP430F5528?

$
0
0
Obviously there are some errors in your program. (1) Please look at the default value of REFCTL0, REFMSTR=1 and REFVSEL=0. So, REFOUT is controlled by ADC module and REF voltage = 1.5V. You have to set REFCTL0 = REFVSEL_2|REFOUT|REFON. Don't use "|=". (2) Don't use "float Batt" and compare it with bits. You should use "int Batt" to compare it with 0x0001. I don't check CBCTLx settings yet. But you should fix the above two issues and try again.

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>