Arduino Mega 2560 Rev3 - Features, pinout, drivers, 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.
Content
Arduino Mega 2560 Specifications
Schematic diagram
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 the 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 .
Schematic diagram
Description of the elements of the Arduino Mega 2560 board
Microcontroller ATmega2560 - The heart of the Arduino Mega 2560 platform is the 8-bit AVR microcontroller, the ATmega2560. It provides 256 KB of flash memory for storing firmware, 8 KB of SRAM and 4 KB 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.
Microcontroller ATmega2560 - The heart of the Arduino Mega 2560 platform is the 8-bit AVR microcontroller, the ATmega2560. It provides 256 KB of flash memory for storing firmware, 8 KB of SRAM and 4 KB 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
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.
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
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.
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().
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.
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.
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 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 and 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.
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 and 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.
Social Plugin