You are on page 1of 3

Introduction to Microcontrollers

A microcontroller (sometimes abbreviated C, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. Atmel AVR architecture The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.

Basic families AVRs are generally classified into five broad groups: tinyAVR the ATtiny series 0.58 kB program memory 632-pin package Limited peripheral set megaAVR the ATmega series 4256 kB program memory 28100-pin package Extended instruction set (Multiply instructions and instructions for handling larger program memories) Extensive peripheral set XMEGA the ATxmega series 16384 kB program memory 4464100-pin package (A4, A3, A1) Extended performance features, such as DMA, "Event System", and cryptography support. Extensive peripheral set with DACs Application specific AVR megaAVRs with special features not found on the other members of the

AVR family, such as LCD controller, USB controller, advanced PWM, CAN etc. FPSLIC (AVR with FPGA) FPGA 5K to 40K gates SRAM for the AVR program code, unlike all other AVRs AVR core can run at up to 50 MHz [4]
Arduino -Development Board An Arduino is a single-board microcontroller and a software suite for programming it. The hardware consists of a simple open hardware design for the controller with an Atmel AVR processor and on-board I/O support. The software consists of a standard programming language and the boot loader that runs on the board. An Arduino board consists of an 8-bit Atmel AVR microcontroller with complementary components to facilitate programming and incorporation into other circuits. An important aspect of the Arduino is the standard way that connectors are exposed allowing the CPU board to be connected to a variety of interchangeable add-on modules (known as shields)

Program to Blink an LED As a microcontroller, Arduino doesn't have any pre-established output devices. Willing to provide newcomers with some help while debugging programs, we propose the use of one of the board's pins plugging a LED that we will make blink indicating the right functionallity of the program. We have added a 1K resistor to pin 13, what allows the immediate connection of a LED between that pin and ground. LEDs have polarity, which means they will only light up if you orient the legs properly. The long leg is typically positive, and should connect to pin 13. The short leg connects to GND; the bulb of the LED will also typically have a flat edge on this side. If the LED doesn't light up, trying reversing the leg

int ledPin = 13;

// LED connected to digital pin 13

void setup() { pinMode(ledPin, OUTPUT); }

// sets the digital pin as output

void loop() { digitalWrite(ledPin, HIGH); // sets the LED on delay(1000); // waits for a second

digitalWrite(ledPin, LOW); // sets the LED off delay(1000); // waits for a second }

You might also like