You are on page 1of 19

Embedded

Systems
Engr. Rashid Farid Chishti
chishti@iiu.edu.pk
Chapter 01: The AVR Microcontroller:
International Islamic University H-10, Islamabad, Pakistan
History
and Features
http://www.iiu.edu.pk

CPU vs. MCU

Microprocessor

No RAM, ROM, I/O Ports on chip itself


e.g. Pentium (Intel), PowerPC (Motorola), Spark (SUN)
Applications: Desktop, Laptop, workstations, Servers

Microcontroller

Microprocessor, RAM, ROM, timers, I/O Ports on a single


chip.
8051(Intel), 68HC08 (Motorola), AVR (Atmel), Z8 (Zilog),
PIC (Microchip), ARM (Advanced RISC Machine).
Application: TV Remote Control, video games, robots,

CPU vs. MCU

8-bit Microcontrollers

Embedded Systems

An embedded system is controlled by its own


internal microprocessor (or microcontroller)
as opposed to an external controller.
A PC is connected to various embedded
products such as keyboard, printer, modem,
disk controller, sound card, CD-ROM driver,
mouse and so on.
a printer gets data and prints it. A mouse
takes coordinates and sends to the PC.

Embedded Products

Computing

PC
Notebook
Laptop
Storage
Color printer
Laser printer
Modem
Cable modem
Copier
Scanner
Digital camera

Cars

Anti-lock breaks
Air bags
Engine Control
Transmission
Control
Climate control
Collusion
avoidance
Navigation
Trip Computer
Instrumentation
Keyless entry

Communications

Wire-line Phone
Cellular Phones
PDA
Pager
Fax machine
Intercom

Cards

Banking
Electronic Purse
Social Security
Tolls

Embedded Products

Consumer

VCR, CD
Video games
DVD Player
Stereo
Smoke alarm
Camera
Remote Control
Garage Door
Opener
Security System

Consumer

Toys
Answering
machine
Camcorder
Musical
Instruments
Sewing
Machine
Exercise
equipment

Connectivity

Cable TV
Cable Modem
Router
Hub

Choosing a microcontroller

Speed: What is the highest speed a microcontroller


supports?
Packaging: Is it DIP (dual inline package) or a QFP
(quad flat package) or some other type?
Power Consumption: Critical for battery powered
products.
The amount of RAM and ROM on chip
The number of timers and I/O pins on chip
Cost per unite
Availability of Compiler, Simulator, Debugger.
Availability of chip in market

The AVR microcontroller

The basic architecture of AVR was designed


Family

by two students of Norwegian Institute of


Technology (NTH), Alf-Egil Bogen and
Vegard Wollan, and then was bought and
developed by Atmel in 1996.
The AVR stands for Advanced Virtual RISC,
or Alf and Vegard RISC.
The AVR is an 8-bit RISC single-chip
microcontroller with Harvard architecture.

RISC and CISC


CISC(Complex Instruction Set Computer)

A large number of instructions, typically from 100 to 250


instructions
Some instructions that perform specialized task and are used
infrequently
A large variety of addressing modes, typically from 5 to 20
different modes
Variable-length instruction formats

RISC(Reduced Instruction Set Computer)

Relatively few instructions


Relatively few addressing modes
Fixed-length, easily decoded instruction format

Harvard and von Neumann

Architecture
von Neumann (Princeton) architecture.

The same bus is used for accessing both the code and data
Pentium Processor is based on von Neumann Architecture

Harvard architecture

1.
2.
3.
4.

Separate buses are used for accessing the code and data
memory.
That means that we need four sets of buses:
A set of data buses for carrying data into and out of the CPU,
A set of address buses for accessing the data,
A set of data buses for carrying code into the CPU, and
An address bus for accessing the code
This is easy to implement inside an IC chip such as a
microcontroller where both ROM code and data RAM are
internal (on-chip) and distances are on the micron and millimeter
scale

The AVR microcontroller


Family

The Simplified view of an AVR Microcontroller

The AVR Family

The AVR can be classified into four groups: Classic, Mega, Tiny,
and special purpose.
Classic AVR (AT90Sxxxx)
This is the original AVR chip, which has been replaced by newer
AVR chips. These are not recommended for new designs.
Mega AVR (ATmegaxxxx)
These are powerful microcontrollers with more than 120
instructions and lots of different peripheral capabilities, which can
be used in different designs. Some of their characteristics are as
follows:
Program memory: 4K to 256K bytes
Package: 28 to 100 pins
Extensive peripheral set
Extended instruction set: They have rich instruction sets.

The AVR Family

The AVR Family

Tiny AVR (ATtinyxxxx)


This group have less instructions and smaller packages in
comparison to mega family. You can design systems with low
costs and power consumptions using the Tiny AVRs. Some of
their characteristics are as follows:

Program memory: IK to 8K bytes


Package: 8 to 28 pins
Limited peripheral set
Limited instruction set: The instruction sets are limited. For example,
some of them do not have the multiply instruction.

Special purpose AVR


The ICs of this group can be considered as a subset of other
groups, but their special capabilities are made for designing
specific applications. Some of the special capabilities are: USB
controller, CAN controller, LCD controller, Zigbee, Ethernet
controller, FPGA, and advanced PWM.

The AVR Family

You might also like