Arduino Mega 2560 Rev3 - Features, pinout, driver, board description

Ad Code

Arduino Mega 2560 Rev3 - Features, pinout, driver, board description

Arduino Mega 2560 Rev3 - Features, pinout, driver, board description

Arduino Mega 2560 is an extended version of the Arduino Uno built on the ATmega2560 microcontroller, has more contacts - 54 digital I / Os (14 of which can be used as PWM outputs), 16 analog inputs, more hardware serial ports - 4 serial UART ports, crystal oscillator 16 MHz, USB connector, power connector, ICSP connector and reset button.

To work with Mega 2560, you need to connect the platform to your computer using a USB cable or supply power using an AC / DC adapter or a rechargeable battery. Arduino Mega 2560 is compatible with all expansion boards designed for Arduino Uno or Duemilanove platforms.

The Arduino Mega 2560 Rev3 is the latest model to replace the previous Arduino Mega 2560 and Mega 1280. The Rev3 version includes an Atmega16U2 chip (Atmega8U2 in Rev1 and Rev2 versions) with a USB to Serial converter firmware instead of those used in more early versions of FTDI chips. The ATmega16u2 microcontroller allows the Arduino Mega2560 controller to be used as a USB HID device. By flashing this microcontroller, the controller can be used as a keyboard, mouse or game joystick.

Arduino Mega 2560 Specifications

Arduino Mega 2560 Rev3 - ATmega2560 microcontroller

Working voltage5B
Supply voltage (recommended)7-12V
Supply voltage (limit)6-20V
Digital I / O54 (14 of which can function as PWM outputs)
Analog inputssixteen
PWM pins
Constant current through input / output40 mA
Maximum output current of output 3.3V50 mA
Flash memory256 KB (of which 8 KB are used for bootloader)
Clock frequency16 MHz
Built-in LEDthirteen
Length101.6 mm
Width53.4 mm
Weight25 g

Schematic diagram

Schematic diagram - Arduino Mega 2560 Rev 3 (Atmega16U2-MU)Schematic diagram - Arduino Mega 2560 Rev 2 (Atmega8U2-MU)

Arduino Mega 2560 CH340G

Arduino Mega 2560 CH340G
This board has all the features of the classic Arduino Mega 2560 Rev3 board. The main differences from the original are due to the fact that a USB bridge is used to reduce the cost of the board, it is made on a budget CH340G microcircuit All elements of external connections, including the names of ports, on this board fully correspond to the schematic diagram of the original board. For the CH340G USB bridge chip, you need to install drivers on your computer, which can be downloaded here .
Arduino Mega 2560 USB-UART Converter CH340G

Schematic diagram

Arduino Mega 2560 CH340G - schematic diagram

Description of the elements of the Arduino Mega 2560 board

  • ATmega2560 Microcontroller - The heart of the Arduino Mega 2560 platform is the 8-bit AVR microcontroller, the ATmega2560. It provides 256KB of flash memory for storing firmware, 8KB of SRAM and 4KB of non-volatile EEPROM for data storage.
  • Microcontroller ATmega16U2 - The ATmega16U2 microcontroller provides communication between the ATmega2560 microcontroller and the USB port of the computer. When connected to a PC, the Arduino Mega 2560 is defined as a virtual COM port. The 16U2 firmware uses standard USB-COM drivers - no external drivers are required.
  • I / O ports
  • LED indication
    • RX and TX - Flashes when communicating between the Arduino Mega 2560 and the PC.
    • L - Output LED 13. When set to HIGH, the LED turns on, when set to LOW, it turns off.
    • ON - Availability of power to the Arduino Mega 2560.
  • USB Type-B connector - The USB Type-B connector is designed to flash the Arduino Mega 2560 platform using a computer.
  • Connector for external power supply - Connector for connecting an external power supply from 7 V to 12 V.
  • ICSP Connector for ATmega2560 - The ICSP connector is for in-circuit programming of the ATmega2560 microcontroller. Also, using the SPI library, these pins can communicate with expansion boards via the SPI interface. SPI lines are brought out to a 6-pin connector, and are also duplicated on digital pins 50 (MISO), 51 (MOSI), 52 (SCK) and 53 (SS).
  • ICSP Connector for ATmega16U2 - ICSP connector for in-circuit programming of the ATmega16U2 microcontroller.

I / O ports

Arduino Mega 2560 Rev3 - Ports

  • Digital inputs / outputs : pins 0-53
    Logic level of one - 5 V, zero - 0 V. Maximum output current - 40 mA. Pull-up resistors are connected to the contacts, which are disabled by default, but can be enabled by software.
  • PWM : pins 2-13 and 44-46
    Allow 8-bit analog values ​​to be output as a PWM signal.
  • ADC : pins A0 – A16
    16 analog inputs, each of which can represent analog voltage as a 10-bit number (1024 values). The ADC capacity is 10 bits.
  • TWI / I²C : pins 20 ( SDA ) and 21 ( SCL )
    For communication with peripherals using a synchronous protocol, via 2 wires. Use the Wire library to work.
  • SPI : pins 50 ( MISO ), 51 ( MOSI ), 52 ( SCK ) and 53 ( SS ).
    SPI commutation pins (use the SPI library).
  • UART :
    • Serial : pins 0 (RX) and 1 (TX);
    • Serial1 : pins 19 (RX) and 18 (TX);
    • Serial2 : pins 17 (RX) and 16 (TX);
    • Serial3 : pins 15 (RX) and 14 (TX).

    These pins are used to receive (RX) and transmit (TX) data over the serial interface. Pins 0 (RX) and 1 (TX) are connected to the corresponding pins of the ATmega16U2, which acts as a USB-UART converter.


Arduino Mega 2560 pin description

Description of pins (pinout) Arduino Mega 2560

Mega board digital pins

Pins numbered 0 through 53 are numeric. This means that you can only read and apply two kinds of signals to them: HIGH and LOW. With PWM, you can also use digital ports to control the power of connected devices.

PinAddressingSpecial appointmentPWM
00RX (Serial)
oneoneTX (Serial)
22Interrupt input 0PWM
33Interrupt input 1PWM
thirteenthirteenBuilt-in LEDPWM
1414TX (Serial3)
1515RX (Serial3)
sixteensixteenTX (Serial2)
1717RX (Serial2)
eighteeneighteenTX (Serial1)
Input for interrupt 5
nineteennineteenRX (Serial1)
Interrupt input 4
twentytwentyI2C SDA
Interrupt input 3
2121I2C SCL
Interrupt input 2

Analog pins of the board

The Mega2560 platform has 16 analog inputs, each with a resolution of 10 bits (i.e., it can accept 1024 different values). As standard, the pins have a measuring range of up to 5 V with respect to ground, however it is possible to change the upper limit by means of the AREF pin and function analogReference().

PinAddressingSpecial appointment
A0A0 or 54
A1A1 or 55
A2A2 or 56
A3A3 or 57
A4A4 or 58TCK
A5A5 or 59TMS
A6A6 or 60TDO
A7A7 or 61TDI
A8A8 or 62PCINT16
A9A9 or 63PCINT17
A10A10 or 64PCINT18
A11A11 or 65PCINT19
A12A12 or 66PCINT20
A13A13 or 67PCINT21
A14A14 or 68PCINT22
A15A15 or 69PCINT23

Additional pins on the board

  • AREF - Voltage reference for analog inputs. Used with a function analogReference().
  • Reset - A low signal level at the pin reboots the microcontroller. Usually used to connect a reset button on an expansion board, which prevents access to the button on the Arduino board itself.

Power pins

  • Vin : Input voltage of the Arduino board when using an external source (unless there is a 5 volt voltage on the USB connection or from another power source). You can supply power to this pin, or, if power is supplied to the 2.1 mm connector, you can get from this pin to the supply input voltage.
  • 5V : The voltage on these pins is regulated by the on-board voltage regulator. The board can be powered either through the 2.1mm power connector (7-12V), via the USB connection (5V), or via the VIN pin (7-12V) on the board. Powering the 5V or 3.3V pins bypasses the regulator and could damage the board. This is not recommended.
  • 3.3V : 3.3V is generated by the on-board regulator. The maximum current consumption should not exceed 50 mA.
  • GND : Ground pins.
  • IOREF : This pin provides the reference voltage with which the microcontroller operates. For the correct configuration of external boards, you can read the voltage from this pin and select the appropriate power source or turn on voltage converters to work with 5 V or 3.3 V.

Arduino Mega 2560 Power

The Arduino Mega can be powered from a USB port or external source. The power supply is automatically selected.

External power (not USB) can be supplied from the AC adapter or battery. The power supply is connected to the 2.1 mm connector on the board, which has a central positive terminal. Battery power can be connected to the GND and VIN pins of the POWER connector.

The board can operate from an external voltage source in the range from 6 to 20 volts. If the power supply voltage is less than 7V, the 5V output may be less than 5V and the board may become unstable. If the voltage of the external source exceeds 12 V, the voltage regulator may overheat and damage the board. The recommended supply voltage range is 7-12 volts.

Installing drivers

If you've used the installer, Windows - XP to 10 - will automatically install the drivers as soon as you plug in your board. If you downloaded and unpacked the Zip archive, or for some reason the board is not recognized correctly, follow the procedure below.

  • Click on the start menu and open the control panel.
  • Go to the System and Security section Then click on "System". Then open the Device manager.
  • Look under Ports (COM & LPT) (Ports (COM & LPT)). You should see an open port named " USB Serial Device ". If the COM and LPT section is missing, see the Other Devices, Unknown Device section.
  • Right click on the USB Serial Device port  and select the " Update Drivers ... " option .
  • Then select the option " Search for drivers on this computer ".
  • Finally, find a driver file named “ arduino.inf ” located in the “ Drivers ” folder of the Arduino program (not the “FTDI USB Drivers” subdirectory).
  • Windows will then complete the driver installation.

Board and port selection

Open Arduino IDE. From the Tools> Board menu, select Arduino / Genuino Mega or Mega 2560 . Select the processor / microcontroller of the board, usually ATmega2560. Select ATmega2560 (Mega 2560) from the Tools> Processor menu Select the board's serial device from the Tools> Port menu Most likely it is COM3 (Arduino / Genuino Mega or Mega 2560) or higher (COM1 and COM2 are usually reserved). To find out, you can turn off your board and reopen the menu; the entry that disappears must be Arduino or Genuino Mega. Connect the board and select this serial port.
If you have an Arduino Mega 2560 CH340G model, then it is better to use the Arduino as ISP programmer It is possible not to use a bootloader and program the microcontroller via ICSP pins (in-circuit programming).


Close Menu