Professional Documents
Culture Documents
Unit - I-1
Unit - I-1
DEPARTMENT OF PHYSICS
2
interconnected computers that work on the same application together, sharing tasks that can
be performed concurrently.
Microprocessor:
A microprocessor is a controlling unit of a micro-computer, fabricated on a small chip
capable of performing Arithmetic Logical Unit (ALU) operations and communicating with the
other devices connected to it.
In this tutorial, we will discuss the architecture, pin diagram and other key concepts of
microprocessors.
Microprocessor is a controlling unit of a micro-computer, fabricated on a small chip capable of
performing ALU (Arithmetic Logical Unit) operations and communicating with the other
devices connected to it.
Microprocessor consists of an ALU, register array, and a control unit. ALU performs
arithmetical and logical operations on the data received from the memory or an input device.
Register array consists of registers identified by letters like B, C, D, E, H, L and accumulator.
The control unit controls the flow of data and instructions within the computer.
3
Here is a list of some of the frequently used terms in a microprocessor −
Instruction Set − It is the set of instructions that the microprocessor can understand.
Bandwidth − It is the number of bits processed in a single instruction.
Clock Speed − It determines the number of operations per second the processor can perform.
It is expressed in megahertz (MHz) or gigahertz (GHz).It is also known as Clock Rate.
Word Length − It depends upon the width of internal data bus, registers, ALU, etc. An 8-bit
microprocessor can process 8-bit data at a time. The word length ranges from 4 bits to 64 bits
depending upon the type of the microcomputer.
Data Types − The microprocessor has multiple data type formats like binary, BCD, ASCII,
signed and unsigned numbers.
Development of Microprocessor:
4-bit Microprocessors
The first microprocessor was introduced in 1971 by Intel Corp. It was named Intel 4004 as
it was a 4 bit processor. It was a processor on a single chip. It could perform simple arithmetic
and logic operations such as addition, subtraction, boolean AND and boolean OR. It had a
control unit capable of performing control functions like fetching an instruction from memory,
decoding it, and generating control pulses to execute it. It was able to operate on 4 bits of data
at a time. This first microprocessor was quite a success in industry. Soon other
microprocessors were also introduced. Intel introduced the enhanced version of 4004, the
4040. Some other 4 bit processors are International’s PPS4 and Thoshiba’s T3472.
8-bit Microprocessors:
The first 8 bit microprocessor which could perform arithmetic and logic operations on 8 bit
words was introduced in 1973 again by Intel. This was Intel 8008 and was later followed by an
improved version, Intel 8088. Some other 8 bit processors are Zilog-80 and Motorola M6800.
16-bit Microprocessors:
The 8-bit processors were followed by 16 bit processors. They are Intel 8086 and 80286.
32-bit Microprocessors:
The 32 bit microprocessors were introduced by several companies but the most popular one
is Intel 80386.
Pentium Series:
Instead of 80586, Intel came out with a new processor namely Pentium processor. Its
performance is closer to RISC performance. Pentium was followed by Pentium Pro CPU.
Pentium Pro allows allow multiple CPUs in a single system in order to achive multiprocessing.
4
The MMX extension was added to Pentium Pro and the result was Pentiuum II. The low cost
version of Pentium II is celeron.
The Pentium III provided high performance floating point operations for certain types of
computations by using the SIMD extensions to the instruction set. These new instructions
makes the Pentium III faster than high-end RISC CPUs.
Interestingly Pentium IV could not execute code faster than the Pentium III when running at
the same clock frequency. So Pentium IV had to speed up by executing at a much higher clock
frequency.
Pin Diagram of 8085 Microprocessor :
5
WR − This signal indicates that the data on the data bus is to be written into a selected
memory or IO location.
ALE − It is a positive going pulse generated when a new operation is started by the
microprocessor. When the pulse goes high, it indicates address. When the pulse goes down it
indicates data.
Three status signals are IO/M, S0 & S1.
IO/M:
This signal is used to differentiate between IO and Memory operations, i.e. when it is high
indicates IO operation and when it is low then it indicates memory operation.
S1 & S0:
These signals are used to identify the type of current operation.
Power supply:
There are 2 power supply signals − VCC & VSS. VCC indicates +5v power supply and VSS
indicates ground signal.
Clock signals:
There are 3 clock signals, i.e. X1, X2, CLK OUT.
X1, X2 − A crystal (RC, LC N/W) is connected at these two pins and is used to set frequency of
the internal clock generator. This frequency is internally divided by 2.
CLK OUT − This signal is used as the system clock for devices connected with the
microprocessor.
Interrupts & externally initiated signals
Interrupts are the signals generated by external devices to request the microprocessor to
perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
We will discuss interrupts in detail in interrupts section.
INTA − It is an interrupt acknowledgment signal.
RESET IN − This signal is used to reset the microprocessor by setting the program counter to
zero.
RESET OUT − This signal is used to reset all the connected devices when the microprocessor is
reset.
READY − This signal indicates that the device is ready to send or receive data. If READY is low,
then the CPU has to wait for READY to go high.
HOLD − This signal indicates that another master is requesting the use of the address and data
buses.
6
HLDA (HOLD Acknowledge) − It indicates that the CPU has received the HOLD request and it
will relinquish the bus in the next clock cycle. HLDA is set to low after the HOLD signal is
removed.
Serial I/O signals:
There are 2 serial signals, i.e. SID and SOD and these signals are used for serial
communication.
SOD (Serial output data line) − The output SOD is set/reset as speci ied by the SIM instruction.
SID (Serial input data line) − The data on this line is loaded into accumulator whenever a RIM
instruction is executed.
8085 microprocessor
8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor
designed by Intel in 1977 using NMOS technology.
It has the following configuration −
8-bit data bus
16-bit address bus, which can address upto 64KB
A 16-bit program counter
A 16-bit stack pointer
Six 8-bit registers arranged in pairs: BC, DE, HL
Requires +5V supply to operate at 3.2 MHZ single phase clock
It is used in washing machines, microwave ovens, mobile phones, etc.
8085 Microprocessor – Functional Units:
Accumulator
It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE operations. It is
connected to internal data bus & ALU.
Arithmetic and logic unit
As the name suggests, it performs arithmetic and logical operations like Addition,
Subtraction, AND, OR, etc. on 8-bit data.
General purpose register
There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each register
can hold 8-bit data.
These registers can work in pair to hold 16-bit data and their pairing combination is like B-C,
D-E & H-L.
7
Program counter
It is a 16-bit register used to store the memory address location of the next instruction to be
executed. Microprocessor increments the program whenever an instruction is being executed,
so that the program counter points to the memory address of the next instruction that is going
to be executed.
Stack pointer
It is also a 16-bit register works like stack, which is always incremented/decremented by 2
during push & pop operations.
Temporary register
It is an 8-bit register, which holds the temporary data of arithmetic and logical operations.
Flag register
It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1 depending upon the
result stored in the accumulator.
These are the set of 5 flip-flops −
Sign (S)
Zero (Z)
Auxiliary Carry (AC)
Parity (P)
Carry (C)
Its bit position is shown in the following table −
D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY
1)Simple registers
a) Accumulator :
(A) 8 bit
(B) Used as a register for storing one data when two are arithmetically and logically
operated .
(C) after ALU operation result is also stored in accumulator.
(D) when single no is to be logically operated only accumulator is used as a storage as well as
9
storing result after execution.
2) General purpose register-
(A) B,C,D,E,H &L are used as general purpose register.
(B) Each 8 bit long .
(C) Pairing can also be done in a standard way to stored 16 bit data
eg (B-C, D-E, H-L)
(D) H-L pair is an exceptional pair which is used as a memory pointer to locate an address L
XH 2000H.
H recognize H-L pair of general purpose register:
Load 16 bit data immediately in H-L pair it means 2000H is the location of memory where
data is stored and it is recall by an instruction MOV A M
M locates memory location 2000H which is pointed bye H-L pair.
Exceptional point in 8085 microprocessor 16 bit additional can only be possible by using an
instruction DAD.
3) Special function register-
stack pointer & program counter are two special function register these are those register
which are used only by microprocessor not by user.
a) Program counter-
(1) it is a 16 bit register
(2)Used by microprocessor
(3)It holds the address of next instruction to be executed for eg- after execution MOV A,B
instruction program counter will be automatically incremented and points next location of
memory where another data to stored.
b) Stack pointer- It is used when interrupt is generated by microprocessor interrupt is a
command which stop the main program counter location will be stored in a stack and program
counter will be loaded with a new address through which sub routine is called.
Sub routine is a small program which is used many times by main program. For example-
Generating delay in main program after execution of each instruction.
c) Stack Small memory location acquired by main program in RAM area.
4) Other Registers-
1) Instruction Registers
2) Temporary Register
10
a) Instruction Registers-
1) 8 Bit long
2) It will store opcode (8 Bit) of an instruction.
b) Temporary register-
1) 8 Bit long
2) It will store the data temporary before execution of instruction.
Instruction decoder-
Bits generated by instruction registers will be decoded by instruction decode, It means digital
signal will be converted in analog signals and these signals will be send to timing and controll
unit.
Timing and Control Unit-
Signals generated by instruction decoder will be provided by control by way using this unit.
For example-RD, WR, SID, SOD.
SID & SOD are known as Serial In data and Serial out Data.
For example- Copy data from pen drive to microprocessor and vice versa.
Address/Data Bus Buffer (AD0 to AD7)-
1) 8 bit bidirectional.
2) Address as well as data on the same bus.
3) Both data and address will be differentiating by clock cycle generated by timing and control
unit.
4) First clock cycle will be loaded lower 8 bit address on the bus.
5) Two more clock cycle will load the data on address bus.
Address Bus buffer( A8 to A15)-
Higher order address bus unidirectional. Address latch 74373 will be used as temporary
storage for lower bit of address. If address latch is high than address is high and vice versa.
8085 AH1 microprocessor is only microprocessor which operates at 6MHz frequency because
of HMOS technology.
Interrupt signals:
Interrupts are the signals generated by the external devices to request the microprocessor
to perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
Interrupt are classified into following groups based on their parameter −
Vector interrupt − In this type of interrupt, the interrupt address is known to the
processor. For example: RST7.5, RST6.5, RST5.5, TRAP.
11
Non-Vector interrupt − In this type of interrupt, the interrupt address is not known to the
processor so, the interrupt address needs to be sent externally by the device to perform
interrupts. For example: INTR.
Maskable interrupt − In this type of interrupt, we can disable the interrupt by writing some
instructions into the program. For example: RST7.5, RST6.5, RST5.5.
Non-Maskable interrupt − In this type of interrupt, we cannot disable the interrupt by writing
some instructions into the program. For example: TRAP.
Software interrupt − In this type of interrupt, the programmer has to add the instructions into
the program to execute the interrupt. There are 8 software interrupts in 8085, i.e. RST0, RST1,
RST2, RST3, RST4, RST5, RST6, and RST7.
Hardware interrupt − There are 5 interrupt pins in 8085 used as hardware interrupts, i.e.
TRAP, RST7.5, RST6.5, RST5.5, INTA.
Clock signal:
We can define a clock signal as a particular type of signal that oscillates between a high and a
low state.
The signal acts like a metronome, which the digital circuit follows in time to coordinate its
sequence of actions.
Digital circuits rely on clock signals to know when and how to execute the functions that are
programmed. If the clock in a design is like the heart of an animal, then clock signals are the
heartbeats that keep the system in motion.
Clock signals produced:
There are different ways a clock signal can to be produced, but they all start off with the
crystal resonator.
A crystal resonator is commonly referred to as a crystal. In order to operate, crystals are
combined with an amplifier circuit to apply voltage to an electrode near or on the crystal.
The quartz crystal is a tiny slit of quartz with each of the two surfaces metalized and attached
with an electrical connection. It’s important the physical size and shape of the quartz crystal
are precisely cut because this determines the frequency of oscillations produced from the
crystal. Once the crystal is cut and shaped, it cannot be used at any other frequency.
Quartz crystals are more commonly used since the frequency generated from quartz crystals
are more resistant to changes in temperature.
If an internal RC resonator was used instead, changes in temperature would affect the
behavior of the oscillator, leading to changes in the output frequency.
12
Hand shake Signals:
Handshaking is a I/O control method to synchronize I/O devices with the microprocessor. As
many I/O devices accepts or release information at a much slower rate than the
microprocessor, this method is used to control the microprocessor to work with a I/O device
at the I/O devices data transfer rate.
Example:
Supposing that we have a printer connected to a system. The printer can print 100
characters/second, but the microprocessor can send much more information to the printer at
the same time. That’s why, just when the printer gets it enough data to print it places a logic 1
signal at its Busy pin, indicating that it is busy in printing. The microprocessor now tests the
busy bit to decide if the printer is busy or not. When the printer will become free it will change
the busy bit and the microprocessor will again send enough amounts of data to be printed.
This process of interrogating the printer is called handshaking.
13