The USB connection can be used to power the Arduino Mega. The power source makes use of automatic connection. External power can come from an ADC adapter or battery. Leads from the battery can be inserted in the Ground and Vin pin header of the POWER connector. 6 to 20 volts of external supply can be used to operate the board. If the supplyis less than 7V, the 5V pin may supply less than 5V and there is a possibility of the board becoming unstable. If the supply …show more content…
It also makes use of 8 KB of SRAM and 4 KB of EEPROM for this purpose.
Input and Output
Using pinMode() , digitalWrite(), and digitalRead() functions ,the 54 digital pins on the Arduino Mega can be used as an input or output pins. Each pin 20-50Kohms of internal pull up resistance and a receive a maximum current of of 40mA. Special functions of some of the pins include the following: ● 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). TTL serial data can be transmitted and received. Pins 0 and 1 are connected to the respective pins of the ATmega8U2 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). When there is a change in value, rising or falling edge or a low value the pins can be configured to trigger an interrupt. ● PWM: 0 to 13.Using Provide the analogWrite() function it an 8-bit PWM .
● SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). Using the SPI library these pins support SPI communication. The SPI pins are compatible with the Uno if they are broken out on the ICSP