

Bring this line LOW to reset the microcontroller. There are a couple of other pins on the board:ĪREF. By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the analogReference() function. The Mega 2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e. Support TWI communication using the Wire library. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off. There is a built-in LED connected to digital pin 13. The SPI pins are also broken out on the ICSP header.

Provide 8-bit PWM output with the analogWrite() function. See the attachInterrupt() function for details. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.Įxternal Interrupts: 2 ( interrupt 0), 3 ( interrupt 1), 18 ( interrupt 5), 19 ( interrupt 4), 20 ( interrupt 3) and 21 ( interrupt 2).

Serial pins used to receive ( RX) and transmit ( TX) TTL serial data. In addition, some pins have specialized functions: If using more than 12V, the voltage regulator may overheat and damage the board. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. The board can operate on an external supply of 6 to 20 volts. A maximum of 40mA is the value that must not be exceeded to avoid permanent damage to the microcontroller. 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. Each of the 54 digital pins on the Mega can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions.
