

See the mapping between Arduino pins and Atmega2560 ports:Įach of the 54 digital pins on the Mega can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions.
#Arduino uno pinout specs code
The ATmega2560 has 256 KB of flash memory for storing code (of which 8 KB is used for the bootloader), 8 KB of SRAM and 4 KB of EEPROM (which can be read and written with the EEPROM library). A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V. This pin on the board provides the voltage reference with which the microcontroller operates. A 3.3 volt supply generated by the on-board regulator. Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. The board can be supplied with power either from the DC power jack (7 – 12V), the USB connector (5V), or the VIN pin of the board (7-12V). This pin outputs a regulated 5V from the regulator on the board. You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin. The input voltage to the board when it’s using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). If using more than 12V, the voltage regulator may overheat and damage the board. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. The board can operate on an external supply of 6 to 20 volts. Leads from a battery can be inserted in the GND and Vin pin headers of the POWER connector. The adapter can be connected by plugging a 2.1mm center-positive plug into the board’s power jack. The power source is selected automatically.Įxternal (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The Mega 2560 can be powered via the USB connection or with an external power supply. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. The Mega 2560 has a resettable polyfuse that protects your computer’s USB ports from shorts and overcurrent. See this user-contributed tutorial for more information. Or you can use the ISP header with an external programmer (overwriting the DFU bootloader). You can then use Atmel’s FLIP software (Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available in the Arduino repository.
#Arduino uno pinout specs serial
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar see these instructions for details. It communicates using the original STK500 protocol ( reference, C header files). The ATmega2560 on the Mega 2560 comes preprogrammed with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. For details, see the reference and tutorials.
#Arduino uno pinout specs software
The Mega 2560 board can be programmed with the Arduino Software (IDE).
