analogReference(INTERNAL) not available on ATMega2560?

According to the ATMega2560 datasheet, I can select the ADC reference to be EXTERNAL or two internal voltages: 1.1V and 2.56V. However, it is not clear how to specify in the sketch, which internal reference is to be used.

The compiler does not like this:

void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
analogReference(INTERNAL);
}

The board is currently set for External, and I measure 4.8V at AREF. I checked the schematic to the MEGA2560 Arduino board, and I cannot see any connection between the USB port and the AREF net on the schematic.

  1. How is this AREF to VCC connection made?

  2. What is the right argument for analogReference() to select either the internal 1.1 or 2.56V reference?

Error message:
Arduino: 1.6.5 (Windows 8.1), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

ADC_read_RT1.ino: In function ‘void setup()’:
ADC_read_RT1:8: error: ‘INTERNAL’ was not declared in this scope
‘INTERNAL’ was not declared in this scope

According to the Reference documentation, you need to use INTERNAL1V1 or INTERNAL2V56 for a Mega.

The "connection" to the 5V default value is made internally within the ATmega chip. That's why you can't find it on the schematic.

Awesome! Thank you so much!