Sei sulla pagina 1di 20

EC 310

Microcontroller Based
Systems

Introduction - Part II
Lecture 2
Dr Javaid

1 of 40

What is a Microprocessor?
A microprocessor is the central processing unit
(CPU) of a computer constructed within a single chip.
To make a complete microcomputer, it needs to be
connected to: Memory to store data and programs (RAM & ROM)
Input/Output Devices to communicate with the
outside world
Control circuits

2 of 40

Dr Javaid

Microprocessor

3 of 40

Dr Javaid

4 of 40

Dr Javaid

Microprocessor
Introduced in 1971
Intel
Motorola
RCA
MOS technology
Zilog

8080
6800
1801
6502
Z80

5 of 40

Dr Javaid

6 of 40

Dr Javaid

Buses
A collection of wires through which data is
transmitted from one part of a computer to another.
You can think of a bus as a highway on which data
travels within a computer.
Data Bus
Address Bus
Control Bus

Dr Javaid

7 of 40

Data Bus
Information (often called data) inside a computer, is
exchanged among the various components by means of
metallic conductors called data lines. A group of data
lines is called a data bus.
Each data line carries a unit of data called a bit. A bit can
be on or off. On is usually considered to be 5 volts, and
off is considered to be 0 volts.
Data Bus is bi-directional.

8 of 40

Dr Javaid

Data Bus
Data can be represented on paper as a series of ones and
zeros. A one means a bit is on, and a zero means it is off.
A byte with a value of 0 would be represented as
00000000.
Non-zero bytes can be any combination of 1s and 0s.
01100010

Dr Javaid

9 of 40

Address Bus
Data inside a computer is accessed by means of metallic
conductors called address lines. Each of them carries a bit
of information, the same as a data line. A group of address
lines is called an address bus. Just as with data, a bit can
be on or off, and addresses can be represented on paper as
a series of ones and zeros.
Address Bus is Uni-directional.
Addresses are seldom represented in binary. They are
almost always shown in HEX with the 0x prefix.

10 of 40

Dr Javaid

Control Bus
These lines do what their name suggests. The CPU can,
for example, use these lines to tell memory whether a
read or a write is required. This is done by sending
current down the appropriate control lines like, the read
and write lines.

11 of 40

Dr Javaid

Block Diagram of a Microcomputer

12 of 40

Dr Javaid

Registers

Inside CPU

Store information
Could be 8/16/32 bit
Bigger the register size, better the CPU but cost is
increased

ALU
Performs arithmetic function such as AND, OR and NOT

Program Counter (PC)


Points to the address of the next instruction to be
executed
Contents of PC are placed on Address bus to fetch the
desired instruction

Instruction decoder
13 of 40

To interpret the instruction fetched into the CPU

Dr Javaid

Simplified view of inside of CPU


Arithmetic Logic
Unit

Accumulator
Working
Register's

Program

Stack Pointer

Counter

Instruction
Register
14 of 40

Instruction Decode
and control Register
Dr Javaid

Fetch Cycle

15 of 40

Dr Javaid

The Fetch/Execute Cycle of an Instruction


The execution of an instruction starts with the contents of
a special register called the Program Counter (PC)
register; this registers function is to maintain the
Address of the next instruction to be executed.

16 of 40

Dr Javaid

The Fetch/Execute Cycle of an Instruction


The sequence of operations to execute an instruction is:
The contents of PC are placed on the Address bus
A Read Control signal is activated.
The Data or op code are read from memory and placed on data
bus
The op code is latched into CPU internal instructional register
The program is incremented to prepare for next fetch from
memory

17 of 40

Dr Javaid

The Fetch/Execute Cycle of an Instruction


Having performed one fetch /execute cycle, the computer
simply repeats the process forever: this is all a computer
ever does!

Note: The sequencing is all done automatically by the


processors Control Unit, all the programmer has to do
is put the list of instructions in memory and set the PC
to point to the first one.

18 of 40

Dr Javaid

Microcontroller
A microcontroller is a microprocessor plus
memory plus I/O devices, all integrated into one
chip.

Dr Javaid

19 of 40

Microcontroller
A microcontroller is a microprocessor plus
memory plus I/O devices, all integrated into one
chip.

20 of 40

Dr Javaid

10

Microcontroller

Dr Javaid

21 of 40

Microcontroller
A microcontroller can be as powerful as some of the
far larger machines of only a few years ago.
There are many more embedded microcontroller
systems in the world than PCs (in microwave
ovens, washing machines, etc).
Functionally, a TMS 1000 4-bit microcontroller and
an Intel Pentium 32-bit processor are not very
different. (In performance term, they are!)

22 of 40

Dr Javaid

11

Block Diagram of a General Microcontroller

23 of 40

Dr Javaid

Detailed Block Diagram of a General Microcontroller

24 of 40

Dr Javaid

12

Common Microcontrollers Manufacturers

25 of 40

AMCC
Altera
Analog Devices
Atmel
Charmed Labs
Cypress MicroSystems
Dallas Semiconductor
ELAN Microelectronics Corp.
EPSON Semiconductor
Freescale Semiconductor (Ex Motorola)
Fujitsu
Holtek
Infineon
Intel
Dr Javaid

Common Microcontrollers Manufacturers

26 of 40

Lattice Semiconductor
Microchip Technology (PIC)
National Semiconductor
NEC
Parallax
Philips Semiconductors
Rabbit Semiconductor
Renesas Technology
Silabs
Silicon Motion
STMicroelectronics
Texas Instruments
Toshiba
Ubicom
Xemics
http://en.wikipedia.org/wiki/List_of_common_microcontrollers
Xilinx

Dr Javaid

13

Market Share - 2007

27 of 40

Dr Javaid

Market Share Geographical Area

28 of 40

Dr Javaid

14

Embedded system
An embedded system is a special-purpose
computer system designed to perform one or a
few dedicated / specific functions.
In contrast, a general-purpose computer, such
as a personal computer, can do many different
tasks depending on programming.
Embedded systems are not always standalone
devices. Many embedded systems consist of
small, computerized parts within a larger device
that serves a more general purpose.

Dr Javaid

29 of 40

Embedded system
For example, the Gibson Robot Guitar
features an embedded system for tuning
the strings, but the overall purpose of the
Robot Guitar is, of course, to play music.
Similarly, an embedded system in an
automobile provides a specific function as
a subsystem of the car itself.
Embedded systems control many of the
common devices in use today.
30 of 40

Dr Javaid

15

Embedded products
Home

Home

Appliances
Intercom
Telephones
Security system
Garage door openers
Answering machines
Fax machines
TVs
Cable TV tuner
Exercise equipment

VCR
Camcorder
Remote controls
Video games
Cellular phones
Musical instruments
Sewing machines
Lighting control
Paging
Camera
Toys
Dr Javaid

31 of 40

Embedded products
Office
Telephones
Computers
Security systems
Fax machine
Microwave
Copier
Laser printer
Color printer
Pager

32 of 40

Auto
Trip computer
Engine control
Air bag
ABS
Instrumentation
Security system
Transmission control
Entertainment
Cellular phone
Keyless entry

Dr Javaid

16

Market Size of MCU

Market Size of MCU

33 of 40

Dr Javaid

Where are all the Microprocessor?


This is taken from the Australian Newspaper:
--There were something like 2.9 billion
microprocessors/controllers sold in 1997.
Only 70 million of those went into PCs -Quote of the day by Sun chairman and chief
executive Scott McNealy.
The 70 million (x $100) is nice for Microsoft
and Bill Gates. But the real action is with
the 2.2 billion embedded systems
34 of 40

Dr Javaid

17

Lego Mind Storm

Dr Javaid

35 of 40

AIBO
64-bit embedded
RISC processor
64MB RAM
motors, camera,
mic, speaker,
music synthesizer,
WiFi connectivity

36 of 40

Dr Javaid

18

RCX Robot Control Explorer


Hitachi H8/300
8-bit -controller
3V 10MHz CPU
16KB ROM
512B RAM
3 timers
8-ch. 10-bit A/D
serial
communication
51 parallel I/Os
interrupts

Dr Javaid

37 of 40

VOLVO S80 18 ECUs

38 of 40

Dr Javaid

19

VOLVO Engine-Control ECU

Dr Javaid

39 of 40

Engine Control Unit

40 of 40

Dr Javaid

20

Potrebbero piacerti anche