Documente Academic
Documente Profesional
Documente Cultură
UNIT I
SYLLABUS
UNIT I INTRODUCTION
Evolution of Microprocessors, Microcontrollers and Computers,
Microprocessor based system design need-steps, Advantages and
limitations organization of a microcomputer, Bus system
Decoders Tri state logic Interrupts Memory devices:
classifications and its interfacing Data Transfer Concepts,
Methods Parallel I/O interfacing Serial I/O interfacing concepts
Use of SID and SOD lines DMA method of transfer.
UNIT II - MICROPROCESSORS
Intel 8085, Z-80, 8086, 80186, Pentium Architecture Functions of
various blocks and signals addressing modes Program execution
Instruction set Assemblers Instruction Timing and status
signals Stack and subroutine, Pipelining concepts Simple
programs.
Microprosessor
Microprocessor is an IC which has only the CPU inside them.
These microprocessors dont have RAM, ROM, and other
peripheral on the chip.
A system designer has to add them externally to make them
functional. Application of microprocessor includes Desktop PCs,
Laptops, notepads etc.
Microcontroller
Microcontrollers are designed to perform specific tasks. Specific
means applications where the relationship of input and output is
defined.
Depending on the input, some processing needs to be done and
output is delivered.
esrmnotes.in | Class notes made easy.
EVOLUTION OF MICROPROCESSORS
Microprocessors were categorized into five generations:
First
Second
Third
Fourth
Fifth
Their characteristics are described below:
First-generation
The microprocessors that were introduced in 1971 to 1972
were referred to as the first generation systems.
First-generation microprocessors processed their instructions
seriallythey fetched the instruction, decoded it, then
executed it.
When an instruction was completed, the microprocessor
updated the instruction pointer and fetched the next
instruction, performing this sequential drill for each
instruction in turn.
Second generation
By the late 1970s, enough transistors were available on the IC to
usher in the second generation of microprocessor sophistication:
16-bit arithmetic and pipelined instruction processing.
Motorolas MC68000 microprocessor, introduced in 1979, is an
example. Another example is Intels 8080.
This generation is defined by overlapped fetch, decode, and
execute steps (Computer 1996). As the first instruction is processed
in the execution unit, the second instruction is decoded and the
third instruction is fetched.
The distinction between the first and second generation devices
was primarily the use of newer semiconductor technology to
fabricate the chips.
This new technology resulted in a five-fold increase in instruction,
execution,
speed,
and
higher
chip
densities.
Third generation
The third generation, introduced in 1978, was represented by Intels
8086 and the Zilog Z8000, which were 16-bit processors with
minicomputer-like performance.
The third generation came about as IC transistor counts approached
250,000.
Motorolas MC68020, for example, incorporated an on-chip cache
for the first time and the depth of the pipeline increased to five or
more stages.
This generation of microprocessors was different from the previous
ones in that all major workstation manufacturers began developing
their own RISC-based microprocessor architectures (Computer,
1996).
Fourth generation
As the workstation companies converted from commercial
microprocessors to in-house designs, microprocessors entered their
fourth generation with designs surpassing a million transistors.
Leading-edge microprocessors such as Intels 80960CA and
Motorolas 88100 could issue and retire more than one instruction
per clock cycle.
Fifth generation
Microprocessors in their fifth generation, employed decoupled
super scalar processing, and their design soon surpassed 10 million
transistors.
In this generation, PCs are a low-margin, high-volume-business
dominated by a single microprocessor.
Organization of Microcomputer
The basic components of a
microcomputer are:
1) CPU
ALU
Control
Register
2) Program memory
3) Data memory
4) Output ports
5) Input ports
6) Clock generator.
Register Unit:
It contains various register. The registers are used primarily to store
data temporarily during the execution of a program.
Some of the registers are accessible to the uses through
instructions.
Control Unit:
It provides necessary timing & control signals necessary to all the
operations in the microcomputer.
It controls the flow of data between the processor and peripherals
(input, output & memory).
The control unit gets a clock which determines the speed of the
microprocessor.
Program Memory:
The basic task of a microcomputer system into ensure that its CPU
executes the desired instruction sequence is the program properly.
The instruction sequence is started in the program memory on
initialization- usually a power up and manual reset the processor
starts by executing the instruction in a predetermined location in
program memory.
Data Memory:
A microcomputer manipulates data according to the algorithm
given by the instruction in the program in the program memory.
These instruction may require intermediate results to be stored, the
functional block in c have same internal registers which can also
be used if available for such storage external data memory is
needed if the storage requirements is more.
Clock Generator:
Address Bus:
The address bus consists of 16, 20, 24, or more parallel signal lines,
through which the CPU sends out the address of the memory
location.
This memory location is used for to written to or read from.
The number of memory location is depends on 2 to the power N
address lines.
Data Bus:
The data bus consists of 8, 16, 32 or more parallel signal lines.
The data bus lines are bidirectional.
This means that the CPU can read data from memory or from a I/O
port as well as send data to a memory location or to a I/O port.
Control Bus:
The control bus consists of 4-10 parallel signal lines.
The CPU sends out signals on the control bus to enable the outputs
of addressed memory devices or port devices.
Typically control bus signals are memory read, memory write, I/O
read and I/O write.
To read a data from a memory location, the CPU sends out the
address of the desired data on the address bus and then sends out
a memory read signal on the control bus.
8085 microprocessor
PIN DIAGRAM
REGISTER ARRAY
Registers:-These are general purpose registers. Microprocessor
consists 6 general purpose registers of 8-bit each named as B,C,D,E,H
and L.
Generally these registers are not used for storing the data
permanently. It carries the 8-bits data. These are used only during the
execution of the instructions.
These registers can also be used to carry the 16 bits data by making
the pair of 2 registers. The valid register pairs available are BC,DE,
HL. We can not use other pairs except BC,DE and HL. These registers
are programmed by user.
Program Counter:-It is a 16 bit register used as memory pointer. It
stores the memory address of the next instruction to be executed.
So we can say that this register is used to sequencing the program.
The program counter is set to 0000H.
Stack Pointer:-It is also a 16 bit register used as memory pointer. It
points to the memory location called stack. Generally stack is a
reserved portion of memory where information can be stores or
taken back together.
ALE
INTR
RST 7.5
RST 6.5
RST 5.5
TRAP
Feasibility Study
Provides background for actual system development.
Helps in the selection of particular level of
technology depending on the availability of expertise
to operate and maintain the product.
Analyses various approaches like purchasing a system
and modifying or designing the system.
System Specification
System development is done.
A system is defined in terms of set of entities and the
relation between entities.
Initial Design
It defines the functions that will be carried out by
both hardware and software.
Analysis of the problem should be done to define
performance requirements, hardware and software
routines.
Hardware Design
The matching of electrical characteristics and timing
of ICs is done using a complete microprocessor and
peripheral chips.
Software Design
This involves the following steps
Environment and problem specification( data format,
data transfer)
State transition diagram
Flowchart
Memory I/O and register organization
Editing and assembling
Test and debug
Testing should be done by simulating the environment in
which the module is to work.
Once the tests are successfully completed, actual
software is tested block by block.
Integration
Integration of hardware and software is carried out
and the system is simulated under real/simulated
conditions.
Documentation
It helps in the coordinated approach to system
development.
The system specifications, environment, hierarchical
chart, flowchart, state transition diagrams, test
procedures etc. should be included in the
documentation.
esrmnotes.in | Class notes made easy.
Address Decoder
Logical circuit that identifies each combination of signals present at
input
An address decoder is a binary decoder circuit that has two or more
bits of an address bus as inputs and that has one or more device
selection lines (I/O peripherals or memory) as outputs.
When the address for a particular device appears on the address
bus, the address decoder asserts the selection line for that device.
Tri-state Logic
Has three logic states: logic 0, logic1 and high impedance
Has three lines: input, output and enable line
When enable is activated, tri-state device acts as a normal
device
When enable is deactivated, the logic device goes to high
impedance state ( i.e, disconnected from the system)
Hence the peripherals do not load the bus system
Used when Microprocessor allow multiple logic devices to be
connected to the same wire or bus without damage or loss of
data
Truth Table
Logically
A
A
enable
enable
0
0
1
1
A
0
1
0
1
Output
(Z)
(Z)
1
0
53
esrmnotes.in | Class notes made easy.
Interrupts
Interrupt is a mechanism by which an I/O or an instruction can
suspend the normal execution of processor and get itself
serviced.
Generally, a particular task is assigned to that interrupt signal.
In the microprocessor based system the interrupts are used
for data transfer between the peripheral devices and the
microprocessor.
The processor will check the interrupts always at the 2nd Tstate of last machine cycle.
Hardware interrupts:
An external device initiates the hardware interrupts and
placing an appropriate signal at the interrupt pin of the
processor.
If the interrupt is accepted then the processor executes an
interrupt service routine.
The 8085 has five hardware interrupts
(1) TRAP
(2) RST 7.5
(3) RST 6.5
(4) RST 5.5
(5) INTR
Software Interrupts:
A software interrupts is a particular instructions that can be
inserted into the desired location in the program.
There are eight Software interrupts in 8085 Microprocessor.
From RST0 to RST7
TRAP:
This interrupt is a non-maskable interrupt. It is unaffected by
any mask or interrupt enable.
TRAP bas the highest priority and vectored interrupt.
TRAP interrupt is edge and level triggered. This means that
the TRAP must go high and remain high until it is
acknowledged.
In sudden power failure, it executes a ISR and send the data
from main memory to backup memory.
The signal, which overrides the TRAP, is HOLD signal. (i.e., If
the processor receives HOLD and TRAP at the same time then
HOLD is recognized first and then TRAP is recognized).
There are two ways to clear TRAP interrupt.
1.By resetting microprocessor (External signal)
RST 7.5:
The RST 7.5 interrupt is a maskable interrupt.
It has the second highest priority.
It is edge sensitive. ie. Input goes to high and no need to
maintain high state until it recognized.
Maskable interrupt. It is disabled by,
1.DI, SIM instruction
2.System or processor reset.
3.After reorganization of interrupt.
Enabled by EI instruction.
INTR:
INTR is a maskable interrupt. It is disabled by,
1.DI instruction
2.System or processor reset.
3.After reorganization of interrupt.
Enabled by EI instruction.
Non- vectored interrupt. After receiving INTA (active low)
signal, it has to supply the address of ISR.
It has lowest priority.
It is a level sensitive interrupts. ie. Input goes to high and it is
necessary to maintain high state until it recognized.
esrmnotes.in | Class notes made easy.
SIM
RIM
Memory Devices
Classification of RAM
Memory Interfacing
PROBLEM
Interface two numbers of 4Kb EPROM and one 8Kb RAM with 8085
processor. Draw interface diagram and allocate binary address to
memory ICs
Asynchronous
Here the transmitter and receiver
synchronized at irregular intervals.
Used in low speed data transmission.
are
Parallel Mode
Entire word is transferred at one time (4,8 or 16bits depending on the processor)
Eg: Keyboard, seven segment LEDs, data
converters memory
Serial Mode
Data is transferred one bit at a time over a single
line
Before transfer parallel to serial conversion is
done and vice versa at reception
Eg: printers(also used in parallel I/O mode),
modems for telephone lines
esrmnotes.in | Class notes made easy.
TYPES OF I/O
Peripheral I/O
Peripheral is indentified with 8-bit address
Instructions
IN : transfers from i/p device to accumulator
OUT : transfers from accumulator to o/p device
Peripheral controlled
When peripheral is faster than microprocessor
Eg: DMA (Direct memory access)