Overview
The MEGA 2560 R3 is an Arduino-compatible development board built around the ATmega2560 microcontroller, with a CH340 USB-to-serial chip handling programming and serial communication. It gives you 54 digital I/O pins, 16 analog inputs, and 256 KB of flash — roughly four times the pins and eight times the program memory of an UNO — which is why it is the go-to board for projects that outgrow smaller Arduinos.
Because it keeps the standard Mega form factor and pin layout, it works with Mega-compatible shields and virtually every Arduino library. It is a strong choice for 3D printer controllers (RAMPS), CNC builds, robotics, home automation panels, and any project juggling many sensors, relays, displays, or serial devices at once. Everything happens over a single USB connection: power, code upload, and the Serial Monitor.
There is nothing to wire to get started — plug it into your computer with a USB cable, install the CH340 driver if your system needs it, and upload your first sketch from the Arduino IDE.
At a Glance
Specifications
| Parameter | Value |
| Microcontroller | ATmega2560 (8-bit AVR) |
| Clock Speed | 16 MHz |
| Operating Voltage | 5V |
| Input Voltage (VIN / barrel jack) | 7-12V recommended |
| Digital I/O Pins | 54 (15 provide PWM) |
| Analog Input Pins | 16 (10-bit ADC) |
| Flash Memory | 256 KB (8 KB used by bootloader) |
| SRAM / EEPROM | 8 KB / 4 KB |
| Hardware Serial Ports | 4 (Serial, Serial1, Serial2, Serial3) |
| USB-to-Serial Converter | CH340 |
| DC Current per I/O Pin | 20 mA recommended (40 mA absolute max) |
| Dimensions | 101.5 x 53.4 mm |
Getting Started
The MEGA 2560 is a USB-powered host board — there is nothing to wire before your first upload. Connect the board to your computer with a USB cable and follow the steps below.
1. Install the CH340 driver
This board uses the CH340 USB-to-serial chip instead of the ATmega16U2 found on official boards. Most modern operating systems (Windows 10/11, macOS 10.14+, Linux) include the driver already. If no serial port appears when you plug the board in, install the CH340/CH341 driver from the chip vendor (WCH), then unplug and reconnect the board.
2. Configure the Arduino IDE
| IDE Setting | Value |
|---|---|
| Board | Arduino Mega or Mega 2560 |
| Processor | ATmega2560 (Mega 2560) |
| Port | The COM/tty port that appears when the board is plugged in |
3. Powering the board
USB provides 5V and is enough for the board plus light loads such as sensors and small displays. For standalone use, feed 7-12V into the barrel jack or VIN pin — the onboard regulator produces 5V. The board automatically selects the external supply when both are connected.
Code Examples
Blink + Serial (first upload test)
// MEGA 2560 R3 - Blink the onboard LED and print to Serial Monitor
// No wiring required: the LED is built in on pin 13
const int LED_PIN = 13;
void setup() {
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600); // open USB serial
Serial.println("MEGA 2560 R3 is alive!");
}
void loop() {
digitalWrite(LED_PIN, HIGH);
Serial.println("LED ON");
delay(500);
digitalWrite(LED_PIN, LOW);
Serial.println("LED OFF");
delay(500);
}
Using the extra hardware serial ports
// The Mega's signature feature: 4 hardware UARTs.
// This sketch bridges a device on Serial1 (RX1=19, TX1=18)
// to the USB Serial Monitor - ideal for GPS or Bluetooth modules.
void setup() {
Serial.begin(9600); // USB serial monitor
Serial1.begin(9600); // device on pins 19 (RX1) and 18 (TX1)
Serial.println("Serial1 bridge ready");
}
void loop() {
// Forward device -> monitor
if (Serial1.available()) {
Serial.write(Serial1.read());
}
// Forward monitor -> device
if (Serial.available()) {
Serial1.write(Serial.read());
}
}