Documentation

MEGA 2560 R3 CH340 Development Board for Arduino | ShillehTek Product Manual
Documentation / MEGA 2560 R3 CH340 Development Board for Arduino | ShillehTek Product Manual

MEGA 2560 R3 CH340 Development Board for Arduino | ShillehTek Product Manual

shillehtek

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

Microcontroller
ATmega2560
Logic Level
5V
Digital I/O
54 pins (15 PWM)
Analog Inputs
16
Flash Memory
256 KB
USB Interface
CH340

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.

Warning: The MEGA 2560 is a 5V-logic board. When connecting 3.3V devices (ESP modules, many modern sensors), its outputs will present 5V signals — use a level shifter or voltage divider on lines driven by the Mega, and power 3.3V devices from the 3.3V pin (50 mA max), not the 5V rail.
Tip: Do not power motors, pumps, or solenoids from the board's 5V pin. Give high-current loads their own supply and share only GND with the Mega.

Code Examples

Blink + Serial (first upload test)

mega_blink_serial.ino
// 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

mega_serial_bridge.ino
// 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());
  }
}

Frequently Asked Questions

No serial port shows up when I plug the board in. What do I do?
Install the CH340 driver from WCH, then reconnect the board. Also try a different USB cable — charge-only cables have no data lines and are the most common cause of a missing port.
What is the difference between the MEGA 2560 and the UNO?
The Mega has 54 digital pins vs 14, 16 analog inputs vs 6, 256 KB flash vs 32 KB, 8 KB SRAM vs 2 KB, and 4 hardware serial ports vs 1. Sketches written for the UNO run on the Mega with little or no change.
Can I use 3.3V sensors with this board?
Yes. Power them from the 3.3V pin and check signal direction: sensor-to-Mega signals are read fine, but Mega-to-sensor lines are 5V and may need a level shifter or voltage divider. For I2C, use a bidirectional level shifter.
Which pins support PWM (analogWrite)?
Pins 2-13 and 44-46 — 15 channels in total. The ADC inputs A0-A15 are for analogRead and do not output PWM.
Is it safe to connect USB and the barrel jack at the same time?
Yes. The board automatically switches to the external supply when it detects more than about 6.6V on VIN, so nothing back-feeds into your computer.
Will UNO shields and libraries work on the Mega?
Most do. The first rows of headers match the UNO layout, and standard libraries compile for the ATmega2560. Watch out for shields that hardwire SPI to pins 11-13 — on the Mega, SPI lives on pins 50-52 (and the ICSP header).