Vous êtes sur la page 1sur 32

MICROPROCESSORS AND

EMBEDDED SYSTEMS
BACKGROUND

CONCEPT OF A
MICROPROCESSOR
- Digital computer: controlled by a program
move and process data using calculating
logic circuits, memory circuits and I/O
devices.
- Architecture: Putting together logic circuits
to build Calculating logic, memory circuits,
I/O devices
- The architecture of a computer reduced to
single IC to form a circuit called the
Microprocessor which increases the speed
and computing power of a computer.

CONTINUED
A microprocessor has digital circuits
for data handling and computation
under program control
It has a data processing capabilities
performed by logic circuits (ALU)
It is made up of microcircuits
Transistors (logic circuits)

CONCEPT OF A
MICROPROCESSOR
A microprocessor is a multipurpose,
programmable, clock driven, register
based electronic device that reads
binary instructions from a storage
device called memory, accepts
binary data as input and processes
data according to instructions and
provides results as output.

CLASSIFICATION
Based on bit of operation at a time:
==> 4 bit. e.g. Intel 4004
==> 8 bit. e.g. Intel 8088, Zilog Z80, Z180
==> 16 bit. e.g. Intel 8086, 80186, 80286, 80386
==> 32 bit. e.g. Intel Pentium, Celeron, AMD Sempron
==> 64 bit. e.g. AMD Athlon.
Based on the instruction set microprocessors are classified
into:
==> RISC Reduced Instruction Set Computing. These
types of processors are commonly used in ovens, air
conditioners, etc.
==> CISC Complex Instruction Set Computing. The types
of processors are used in desktops, laptops and servers.
==>VLIM Very Long Instruction Word:
==>Superscalar Processor(RISC & CISC)

EVOLUTION OF
MICROPROCESSORS

1970: From tubes to Intel 4004 ( 46 instructions) with 2,300 transistors and
data transfer was 4 bits per second, 740kHz, and a maximum addressable
space of 640 bytes.
4040 an enhancement of 4004 was introduced in 1972, 60 instructions, 8K
program space, interrupt abilities
Intel released 8008 microprocessor with a speed of 200KHz, 8 bit size, It
contained 3,500 transistors and could address memory space of 16KB.
8080 microprocessor with 6,000 transistors, clock speed of 2MHz, data
transfer of 8 bits and memory address of 64KB
8048 in a first 8 bit single chip microcomputer (microcontroller design)
8048 replaced by 8051 and 8052: 8051 had 2 byte instruction set, 8 bit
register , accumulator A
1978 saw the introduction of a 16 bit MOS processor: the 8086
1982: introduction of 80286, with 130 000 transistors
1985: Introduction of a multitasking chip 80386: It had a functional unit,
execution unit, segment unit, decode unit, bus unit, prefetch unit, 32
registers (general purpose registers, debug registers, test registers, 275
000 transistors
486 wit more than 1mil transistors
1993: introduction of the pentium when Intel lost bid to trademark the 586

Zilog released Z-80 microprocessor with


2.5MHz, contained 8,600 transistors,
addressable memory 64KB.
Intel 8085 was released in 1976, 5MHz,
contained 6,500 transistors, 8 bit data bus.
Mos tech introduced 6502 used in apple
designs
Motorola introduced 6800 series
Intel introduced 8086 which brought in the x
86 instructions, addressing 1MB of memory.
Subsequent release of 80386 and 80486 by
Intel saw microprocessors attaining a speed of
up to 100MHz or even more

Even at a time when Intel presented the first 4004


microprocessor, there was already a demand for
microcontrollers: The contemporary TMS1802 from
Texas Instruments, designed for usage in calculators,
was by the end of 1971 advertised for applications in
cash registers, watches and measuring instruments.
The TMS 1000, which was introduced in 1974,
already included RAM, ROM, and I/O on-chip and can
be seen as one of the first microcontrollers, even
though it was called a microcomputer.
The first controllers to gain really widespread use
were the Intel 8048, which was integrated into PC
keyboards, and its successor, the Intel 8051, as well
as the 68HCxx series of microcontrollers from
Motorola.

MICROPROCESSOR VS
MICROCONTROLLER
Microprocessor
CPU is stand-alone,
RAM, ROM, I/O, timer are separate
designer can decide on the amount of ROM, RAM and I/O
ports.
Expansive /extendability
versatility /flexibility
general-purpose

Microcontroller
CPU, RAM, ROM, I/O and timer are all on a single chip
fix amount of on-chip ROM, RAM, I/O ports
for applications in which cost, power and space are critical
single-purpose

OVERVIEW OF DIFFERENT
TYPES OF MEMORY:

Physical device used to store

data/programs

VOLATILE MEMORY : Primary storage : The data is lost on


reboot or when power goes: RAM, SRAM, DRAM

NON-VOLATILE MEMORY: Secondary storage : The data is


saved to a hard drive or flash drive, or it could be a hard
coded chip
All data that stored in this type of memory will retain when
you shutdown your computer. Thus it holds its data even
when the power is turned off: ROM. used for the task of
secondary storage, or long-term persistent storage.
MASKED ROM
PROM
EPROM
EEPROM
FLASH

contd
Electrically addressed non-volatile memories
Masked ROM

One of the earliest forms of non-volatile read-only memory, the mask-programmed ROM
was prewired at the design stage to contain specific data; once the mask was used to
manufacture the integrated circuits, the data was cast in stone (silicon) and could not be
changed.

The mask ROM was therefore useful only for large-volume production, such as for readonly memories containing the start up code in early microcomputers. This program was
often referred to as the bootstrap, as in pulling oneself up by one's own bootstraps.

Due to the very high initial cost and inability to make revisions, the mask ROM is rarely
used in new designs.
Programmable ROM

The programmable ROM contained silicon or metal fuses, which would be selectively
blown or destroyed by a device programmer or PROM programmer in order to change 0s
to 1s. Once the bits were changed, there was no way to restore them to their original
condition. Non-volatile but still somewhat inflexible. Newer Anti-fuse-based PROMs (which
are also referred to as one-time-programmable (OTP) memory) are widely used in
consumer and automotive electronics, radio-frequency identification devices (RFID),
implantable medical devices, and high-definition multimedia interfaces(HDMI) due to
their reliability, fast read speed, and long data retention rates.

contd
Erasable PROMs
There are two classes of non-volatile memory chips
based on EPROM technology.
UV-erase EPROM
The original erasable non-volatile memories were
EPROMs: These could be readily identified by the
distinctive quartz window in the centre of the chip
package. They operated by trapping an electrical
charge on the gate of a field-effect transistor in
order to change a 1 to a 0 in memory. To remove
the charge, one would place the chip under an
intense short-wavelength fluorescent ultraviolet
lamp, returning the entire chip to its original blank
(all ones) state.

contd
PROM

An OTP has quartz window physically missing. Like the fuse, PROM can be written once, but
cannot be erased.
Electrically erasable PROM

Electrically erasable PROMs have the advantage of being able to selectively erase any part of
the chip without the need to erase the entire chip and without the need to remove the chip
from the circuit. While an erase and rewrite of a location appears nearly instantaneous to the
user, the write process is slightly slower than the read process; the chip can be read at full
system speeds.

The limited number of times a single location can be rewritten.

The capacity of an EEPROM also tends to be smaller than that of other non-volatile memories.

EEPROMs are useful for storing settings or configuration for devices ranging from dial-up
modems to satellite receivers.
Flash memory

The flash memory chip is a close relative to the EEPROM; it differs in that it can only be
erased one block or page at a time. It is a solid-state chip that maintains stored data without
any external power source. Capacity is substantially larger than that of an EEPROM, making
these chips a popular choice for digital cameras and desktop PC BIOS chips.

Flash memory devices use two different logical technologiesNOR and NANDto map data.
NOR flash provides high-speed random access, reading and writing data in specific memory
locations; it can retrieve as little as a single byte. NAND flash reads and writes sequentially at
high speed, handling data in small blocks called pages, But then it is slower on read when
compared to NOR. NAND flash reads faster than it writes, quickly transferring whole pages of
data. Less expensive than NOR flash at high densities, NAND technology offers higher
capacity for the same-size silicon.

MICROPROCESSOR SYSTEM

contd
The CPU can put a binary number on the address bus,
to select an individual register in the ROM or RAM or the
I/O. The arrows on this bus show that addresses go one
way only. Data at the selected address can be put on
the data bus.
The CPU can also put data on this bus which can be
written into a register of RAM or I/O. It is not possible to
write data into ROM (read only memory). Why? This is
shown by the single arrow on the ROM data bus and
double arrows on the other two. The control bus
instructs the chips to do various things, such as when
to read or write etc.
The clock tells all the chips when to change what they
are doing. Like the drill sergeant who shouts "LEFT,
RIGHT, LEFT, RIGHT". The crystal control the speed of
operation.

contd

Buses
All of the basic components of the computer are tied together by
communications paths called buses. A computer bus is simply a
parallel collection of conductors that carry data and control signals
from one unit to another.
Types of Buses
Any computer has three major system buses identified by the type of
information they carry. The three major system buses are: Address
bus, Data bus, Control bus. These buses are actually extensions of
the microprocessor's internal communications structures.
Address Bus
The address bus is a unidirectional pathway that carries addresses
generated by the microprocessor to the memory and I/O elements of
the computer. The size of the address bus, determined by the
number of conductors in the bus, determines the number of memory
locations and/or I/O elements the microprocessor can address.

contd
Address Bus Size
If the address bus is composed of 16 lines (or bits), the
microprocessor can generate 65,536 (2 to the power of
16) distinct address codes. If the address bus size is
increased to a 20-bit word size, the microprocessor's
capability to address memory and I/O elements is
increased to 1,048,576 (2 to the power of 20) possible
addresses.
Addressing Capacity
When discussing addressing capacity, it is common to use
the letter K (for kilo) to represent 1024 (2 to the power of
10) addresses. Using this terminology, the 16-bit bus
example is capable of addressing up to 64 KB of memory,
while the 20-bit bus is capable of directly addressing up
to 1,000 KB of memory. 1,000 KB of memory is referred
to as a megabyte of memory and is denoted by the letter
M (MB for megabytes).

contd
Address Codes
When the microprocessor wishes to access a memory location to
perform a Read or Write operation, it does so by placing the
appropriate address code on its address pins and generating the
proper control signals to perform the operation. The
microprocessor uses the same process to access an input or output
element.
Decoding Circuitry
Because the memory unit is normally composed of several memory
chips (RAM and ROM), special decoding circuitry is required to
select the proper IC and then single out the proper memory
location, the input or output device that the microprocessor is
trying to address.
Data Bus
In contrast to the address bus, the data bus is bi-directional in
nature. Data flows along the data bus from the microprocessor to
memory during a Write operation and from memory to the
microprocessor during a Read operation. The direction for data
movement is the same for Read and Write operations between the
microprocessor and I/O devices.

contd

Sharing the Data Bus


Because all the computer elements must share the data bus, any
device connected to the bus must have the capability to put its
outputs in a high impedance state (floating) when not involved in an
operation with the microprocessor. This prevents data from having
more than one source placed on the bus at one time.
Data Bus Size
If two devices attempt to place data on the bus at the same time,
confusion and damage to the devices results. The size of the data
bus usually corresponds to the word size of the computer. In general,
the larger the data bus, the more powerful the system.8-16-32 bits.
Control Bus
The control bus carries the timing and control signals necessary to
coordinate the activities of the entire system. Unlike the other two
buses, the control bus signals are not necessarily related to each
other. Some are output signals from the microprocessor, others are
input signals to the microprocessor from I/O elements. Each different
microprocessor type has its own unique set of control signals, which
it can generate or respond to.

contd

Types of Control Signals


Many control bus signals are common to most microprocessors (or similar
to those used by most processors). The following are some of the common
control signals in use today:
System Clock (SYSCLK), Read/Write Line (R/W Line), Memory Read (MEMR),
Memory Write (MEMW), I/O Read (IOR), I/O Write (IOW)
Clock Control Signal
One of the most important control signals in any microprocessor-based
system is the system clock. This signal provides the timing information for
all the system's activities. Clock signals may be generated on the
microprocessor chip, or by special IC signal generators. Microprocessors
with internal clock generators usually require that an external crystal be
connected to their clock input pins.
Read and Write Signals
The control bus also carries the signals that enable selected memory or I/O
elements for Read and Write operations. These signals may range from a
simple Read/Write line (R/W) to a collection of signals such as Memory
Read (MEMR), Memory Write (MEMW), I/O Read (IOR), and I/O Write (IOW).
These signals are used by the microprocessor in conjunction with
addresses on the address bus to perform Read and Write operations at
selected memory or I/O locations.

contd
Research and write notes on the following:
Bus standards
Polling/busy-wait polling
Pipelining
How pipelining increases the
performance of a microprocessor
Interlock
Parallel processing
Microprocessor interfacing

MICROPROCESSOR
PERFORMANCE

Word length
Addressable space
Instruction execution speed
Type of a microprocessor
Compatibility with software and other
hardware

Microprocessor Architecture
Arithmetic Logic Unit (ALU)
performs a variety of arithmetic and logical function eg comparing two
numbers.
Contains data processing logic
Sends data word over the bus to any device connected to the bus
Add: decrement
Subtract: increment
OR: shift right/left
Exclusive OR : compliment
Changes data: Arithmetic logic change or test data

Control unit/Control logic:


Acepts and generates external control signals such as read and write
and provides timing signals for the entire system. It takes instructions
from the instruction register, figures out what is to be done to the data
and then gives the command necessary to get the job done

MICROPROCESSOR
REGISTERS

storage locations called registers that can be used to hold


instructions, data, and addresses during processing.
SPECIFIC PURPOSE REGISTERS
Accumulator(A and B): 8 bit/16 bit - Most versatile register
Major register that holds data for manipulation
Arithmetic and logic operations on data use both ALU and the
accumulator
If the operation combines two data words, the accumulator
contains one of the data words and the other might be in one of the
registers or memory location. The resulting data word is kept in the
accumulator replacing the previously stored word.
Accumulator also used in data transfer ie data movements between
I/O port and memory location or between one memory location and
another. When a programmed data transfer is executed, the
transfer takes place in two ways; data moves from the source to
the accumulator and then from the accumulator to its destination.
Explain how a microprocessor with two accumulators use
them

Program counter : 16 bit to be able to point to


any one of different memory locations
Keeps track of what instruction is being used and what
the next instruction will be
Receives program address data from any other logic
function connected to the internal data bus.
During execution, the program counter is loaded with
a number which is the address of the memory location
containing the first program instruction. The
instruction is then sent to the memory address
register making contents the same. The memory then
puts the contents on the data bus. Once the
microprocessor fetches instruction from memory the
program counter increments and points to the next
instruction.

Status register
Stores the results of certain tests
performed during the execution of the
program. This makes us write
programs that branch to start a new
location with the program counter
being loaded with a new starting
value. Thus the microprocessor uses
this register to make decision

Stack pointer
The programmer keeps track of the
return address in a special area of
memory called stack. (LIFO) . The
stack pointer points to the next
available location

Memory address register and logic


Holds address of the memory location selected
Points to instruction word being fetched from memory
Once the instruction has been decoded the program
counter increments
If the instruction being executed does not require
addressing memory, then the memory address register
is used during the fetch cycle.
In most microprocessors the length of the memory
address register is the same as that of a program
counter. Why?
Explain the high byte and low byte memory address
registers.
Receive data from the stack pointer, index register and
other devices

Instruction register
Holds the instruction the microprocessor in
currently executing
Loaded by starting the microprocessor on a
fetch/execute cycle
Its output drives the part of the control logic
known as the instruction decorder
Instruction cycle = fetch cycle + execute
cycle
Explain the sequence of the fetch/execute
cycle

Temporary data registers


The need for temporary data
registers arise because the ALU has
no data stirage of its own
These registers support the
operations of ALU

GENERAL PURPOSE
REGISTERS

Register
Register
Register
Register
Register
Register

B
C
D
E
H
L

8085
components

Vous aimerez peut-être aussi