Data Sheet

value, the LED is on, when the pin is LOW, it's off.
I2C: 20 (SDA) and 21 (SCL). Support I2C (TWI) communication using the Wire
library (documentation on the Wiring website). Note that these pins are not in the
same location as the I2C pins on the Duemilanove or Diecimila.
The Mega2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e. 1024
different values). By default they measure from ground to 5 volts, though is it possible to
change the upper end of their range using the AREF pin and analogReference() function.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
Communication
The Arduino Mega2560 has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega2560 provides four hardware UARTs
for TTL (5V) serial communication. An ATmega8U2 on the board channels one of these
over USB and provides a virtual com port to software on the computer (Windows machines
will need a .inf file, but OSX and Linux machines will recognize the board as a COM port
automatically. The Arduino software includes a serial monitor which allows simple textual
data to be sent to and from the board. The RX and TX LEDs on the board will flash when
data is being transmitted via the ATmega8U2 chip and USB connection to the computer (but
not for serial communication on pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the Mega2560's digital
pins.
The ATmega2560 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation on the Wiring
website for details. For SPI communication, use the SPI library.
Programming
The Arduino Mega can be programmed with the Arduino software (download). For details,
see the reference and tutorials.
The ATmega2560 on the Arduino Mega comes preburned with a bootloader that allows
you to upload new code to it without the use of an external hardware programmer. It