Difference between revisions of "SunFounder Mercury Board"
Line 31: | Line 31: | ||
'''AREF:''' provides a reference voltage for analog I/O ports. Most of the time you can leave this pin alone. It issometimes used to set an external reference voltage (between 0V and 5V) as the upper limit for the analog input pins.<br> | '''AREF:''' provides a reference voltage for analog I/O ports. Most of the time you can leave this pin alone. It issometimes used to set an external reference voltage (between 0V and 5V) as the upper limit for the analog input pins.<br> | ||
===Parameters=== | ===Parameters=== | ||
− | * ATmega2560 Microcontroller<br> * FTDI232R for USB-to-serial and Type-C USB Port<br>* Operating Voltage: 5V;Input Voltage: 7-12V (9V preferred)<br>* Parallel male and female I/O Pins<br>* 5V power switch to control the board power<br>* 54 digital I/Os Pins (15 ports support PWM output)<br>* 16 analog Inputs<br> * ICSP port for bootloader<br>* 256KB program storage (8KB for bootloader)<br>* 8KB RAM<br> * 4KB EEPROM<br>* 16 MHz crystal oscillator<br> * Output: 5V, 3.3V input compatible<br>* Compatible with all peripheral modules for Arduino Mega2560<br> | + | *ATmega2560 Microcontroller<br> * FTDI232R for USB-to-serial and Type-C USB Port<br>* Operating Voltage: 5V;Input Voltage: 7-12V (9V preferred)<br>* Parallel male and female I/O Pins<br>* 5V power switch to control the board power<br>* 54 digital I/Os Pins (15 ports support PWM output)<br>* 16 analog Inputs<br> * ICSP port for bootloader<br>* 256KB program storage (8KB for bootloader)<br>* 8KB RAM<br> * 4KB EEPROM<br>* 16 MHz crystal oscillator<br> * Output: 5V, 3.3V input compatible<br>* Compatible with all peripheral modules for Arduino Mega2560<br> |
Revision as of 03:58, 10 April 2017
Contents
Overview
SunFounder Mercury board is totally compatible with the official Arduino Mega2560, with also ATmega2560 as the processor,the same Optiboot bootloaderas Uno.Also it has 54 digital I/Os pins, 16 analog inputs, 256KB program storage, 16MHz crystal oscillator, etc.
Features that make it unique: beautiful red PCB, parallel yellow and red pins, colorful design; uses FTDI232R for USB-to-serial; adopts Type-C, so far the only USB port that supports reversible plug orientation; all I/O ports with two pins (male and female), free to use -just plug Dupont wires regardless of M or F; adds a 5V power switch to control the board power, which may be expected by mass hobbyists (switch off the board when not in use, avoiding frequent plugging); reset button at the board side for convenience; Atmega2560 Microcontroller is packaged in patch which can save much space.
Introduction
The SunFounder Mercury Board is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller;
Power Types(USB Port/Jack)
Every Arduino board needs a way to be connected to a power source. You can power the Mercuryboard by connecting it to your computer via a Type-C USB cable, or by an AC-to-DC adapter or battery. The jack supports a voltage range of 7-12V. Though you're not recommended to use as up to12V, because the adapter is AC to DC, a slight fault in the filter can cause the board to be burnt. You may consider our 9V adapter (on Amazon http://www.amazon.com/dp/B01ABTKHIO).
You can upload the code to the board via the USB cable.
Speaking of power, there is apower switch which is unique among Arduino compatibles. After you've finished an experiment or want to take a break, just switch off the board –in the long term, USB plugging/unplugging can be reduced.
Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF)
The Mercuryboard has pins of several functions, which is marked on the board. GND: ground. There are multiple GND pins on Mercury. They are connected with each other, so you can connect any of them in your circuit.
5V&3.3V: There are 5V and 3.3V voltage regulator chips on the board, thus able to supply 5V and 3.3V. You can choose which to use based on actual situations.
Analog pins: You can tell from the pin name A0-A15: A is short for analog. These pins can read values of analog sensors and convert them to digital ones which we can read.By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference()function.All analog pins supportI/O function and can be used as digital pins, though we don't usually do.
Digital pins: Pins 0-53 are digital pins. Each of the 54 digital pins on the Mega can be used as an input oroutput, using pinMode(),digitalWrite()and digitalRead()functions.They operate at 5 volts. Each pin can provide or receive 20 mA as recommended operating condition and has an internal pull-up resistor (disconnected by default) of 20-50 k ohm. A maximum of 40mA is the value that must not be exceeded to avoid permanent damage to the microcontroller.
They can be used for digital input and output. Digital signals are only 0 and 1.
The name of some pins begins with a # (#3, #5, #6, etc.); they act as normal digital pins, but can also be used for something called Pulse-Width Modulation (PWM). The pins are similar to analog output ones. For example, making an RGB LED flash various colors (refer to the page under LEARN->GetTutorials) is realized by changing the output value of the PWM pin to control LED colors.
The digital pins 0 and 1 can also be used as serial data sending and receiving ports, 0(RX) and 1(TX). Both have an indicator LED, which will blink when you're uploading sketches to Mercury, meaning the board is communicating with your computer via serial interface. In addition, some pins have specialized functions:
•Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16 (TX); Serial 3: 15 (RX) and 14 (TX). Used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.
•External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2). These pins can be configured to trigger an interrupt on a low level, a rising or falling edge, or a change in level. See the attachInterrupt()function for details.
•PWM: 2 to 13 and 44 to 46. Provide 8-bit PWM output with the analogWrite()function.
•SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Arduino /Genuino Mega2560and the old Duemilanove and Diecimila Arduino boards.
•LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
•TWI: 20 (SDA) and 21 (SCL). Support TWI communication using the Wire library. Note that these pins are not in the same location as the TWI pins on the old Duemilanove or Diecimila Arduino boards.
RESET: To rerun the program. It is connected with the RESET button.Just press it down to reset the board.
IOREF: provides a reference voltage for digital I/O ports. Most of the time you can leave this pin alone.
AREF: provides a reference voltage for analog I/O ports. Most of the time you can leave this pin alone. It issometimes used to set an external reference voltage (between 0V and 5V) as the upper limit for the analog input pins.
Parameters
- ATmega2560 Microcontroller
* FTDI232R for USB-to-serial and Type-C USB Port
* Operating Voltage: 5V;Input Voltage: 7-12V (9V preferred)
* Parallel male and female I/O Pins
* 5V power switch to control the board power
* 54 digital I/Os Pins (15 ports support PWM output)
* 16 analog Inputs
* ICSP port for bootloader
* 256KB program storage (8KB for bootloader)
* 8KB RAM
* 4KB EEPROM
* 16 MHz crystal oscillator
* Output: 5V, 3.3V input compatible
* Compatible with all peripheral modules for Arduino Mega2560