Description
Arduino Mega 2560 (CH340) with USB Cable
This Mega 2560-compatible board uses a CH340 USB-to-serial bridge in place of the ATmega16U2 used on the official Mega 2560 Rev3. It is intended for projects that need many input/output connections. A USB cable is included for programming and USB power.
Specifications listed
- Microcontroller: ATmega2560
- USB-to-serial converter: CH340
- Operating voltage: 5 V
- Recommended input voltage: 7–12 V
- Input-voltage limit: 6–20 V
- Digital I/O pins: 54, including 15 PWM-capable pins
- Analog inputs: 16
- DC current per I/O pin: 20 mA (board rating listed)
- 3.3 V pin current: 50 mA (board rating listed)
- Flash: 256 KB, with 8 KB used by the bootloader
- SRAM: 8 KB
- EEPROM: 4 KB
- Clock: 16 MHz
The official Mega 2560 Rev3 uses an ATmega16U2 USB interface; this CH340 board is a compatible alternative. Ratings and layout can differ between board revisions. Do not exceed the input limits or pin-current ratings; the per-pin value is not a total board-current allowance.
How it works
The ATmega2560 runs the sketch, while the CH340 handles USB-to-serial communication with the computer. The board can be powered over USB or from an external supply within the board’s stated input range.
Applications listed
- Complex home-automation projects
- Industrial control systems
- Advanced robot prototypes
- Data-acquisition systems
- Educational projects requiring many I/O pins
Getting started
- Connect the board to the computer using the included USB cable.
- Install the Arduino IDE from the official Arduino website.
- If required, install the WCH CH340 USB-serial driver for your operating system.
- In the IDE, select “Arduino/Genuino Mega or Mega 2560” under Tools → Board.
- Write a sketch or open an IDE example.
- Click Upload to transfer the sketch to the board.
Pin connections
- Digital pins 0–53: digital input/output.
- PWM: the official Mega pinout identifies 15 PWM outputs on pins 2–13 and 44–46.
- Analog inputs A0–A15: read analog signals.
Parts for a basic test
- 1 × Arduino Mega 2560 CH340 board
- 1 × USB cable (included)
- 1 × LED
- 1 × 220 Ω resistor to limit LED current
- 1 × breadboard and jumper wires
LED blink code
int ledPin = 13; // LED pin
void setup() {
pinMode(ledPin, OUTPUT); // Set the pin as an output
}
void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(1000); // Wait one second
digitalWrite(ledPin, LOW); // Turn the LED off
delay(1000); // Wait one second
}
Code overview
setup()runs once at startup and configures pin 13 as an output.loop()repeats: it turns the LED on, waits one second, turns it off, and waits another second.
This example helps you get started with the Mega 2560 CH340 and explore its features. For more advanced projects, see the Arduino IDE libraries and community resources.









