Another variety of the test routine, this time on the F5529 Launchpad. appears to be off by a factor of 2. (5000 is not the right value for the 'map' function?)
#include "Energia.h"
#define ANALOG_HALFVCC_INPUT 11
void setup()
{
// start with the 2.5V internal reference
analogReference(INTERNAL2V5);
Serial.begin(115200); // msp430f5529 Launchpad
}
// returns VCC in millivolts
int getVCC() {
int rawdata = analogRead(ANALOG_HALFVCC_INPUT);
int data = (int)map(rawdata, 0, 4096, 0, 5000); // Modified for ADC12_A
Serial.print("ADC12_A Value: 0x");
Serial.print(rawdata