Jump to content
43oh

MSP430FR2433 - analogReference(INTERNAL2V5) not declared


Recommended Posts

Hi, using the MSP430FR2433 I can measure the supply voltage with the following code in Energia upto 3V successfully: 

#define ANALOG_HALFVCC_INPUT A11

void setup() {  

analogReference(INTERNAL1V5);
data = analogRead(ANALOG_HALFVCC_INPUT);
data = (int)map(data, 0, 1023, 0, 3000);
Serial.println(data);

}

 

However when using

Quote

analogReference(INTERNAL2V5);

there is an error saying INTERNAL2V5 is not declared.

Is there a way to read voltages above 3V for this board too?

 

Many thanks in advance,

Robert

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...