Sunday 14 August 2016

Arduino Mega 2560

Introduction

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 14 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; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila.

Arduino Mega

The Arduino Mega is the addition to the Arduino family.This board is physically larger than all the other boards and offers significantly more digital and analog pins. The MEGA uses a different processor allowing greater program size and more.The Mega2560 differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.Instead, it features the ATmega16U2 programmed as a USB-to-serial converter.The Mega has four hardware serial ports, which means maximum speed if you need a second or third (or fourth) port.The Arduino Mega works in the same way the Arduino Uno does but the difference is that it uses ATmega2560 microcontroller and has more number of digital pins,analog pins.
Mega2560.png

Technical Specifications

  1. Microcontroller: ATmega1280 or 2560
  2. Operating Voltage: 5V
  3. Input Voltage(recommended): 7-12V
  4. Input Voltage(limits): 6-20V
  5. Digital I/O Pins: 54 (of which 14 provide PWM output)
  6. Analog Input Pins: 16
  7. DC Current per I/O Pin: 40 mA
  8. DC Current for 3.3V Pin: 50 mA
  9. Flash Memory: 128KB or 256KB
  10. SRAM: 8 KB
  11. EEPROM: 4 KB
  12. Clock Speed: 16 MHz

How to program Arduino Mega?

The Arduino Mega can be programmed with Ardunio IDE like Arduino Uno. So the user can find it easy to program the Arduino Mega.

Hardware and Software Required

  • Arduino Mega2560
  • Arduino IDE(1.0.6 Version)

Program to turn on the Led

Before uploading the code to Mega,make sure that you have selected the correct board and port under the tools menu.The Arduino Mega has on board LED like Uno. The program given below turns the led on and off with one second time delay.You can find this program under the built-in examples of Arduino IDE.
void setup() 
{
pinMode(13, OUTPUT);// initialize digital pin 13 as an output.
}
void loop()// the loop function runs over and over again forever
{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

No comments:

Post a Comment