Microprocesser 8086 Chapter No - 1
Microprocesser 8086 Chapter No - 1
MicroComputer :-
Features
1. It is a low speed computer.
2. The storage capacity is also less.
3. It consists of only one CPU. This CPU is a single chip device which is called a
microprocessor. -
4. Microcomputer is also called a microprocessor based system.
5. The word length for a microcomputer is not fixed.
6. It is a software controlled d system because, without the software it is a dead
7. machine.
8. It is available in two types (9 Single board, and (II) Multi board.
9. It consists of semiconductor chips and electromechanical devices like the floppy
disk drive, the hard disk drive, etc.
In applications point of view, the microcomputer is classified into the following
categories
(i) Dedicated controllers,
(ii) Personal computers and work stations,
(iii) Real time controllers, and
(iv) Communication system controllers.
Program Memory
It is used to store all programs (system software and user software). It consists
of ROM and RAM chips.
ROM is used to store system programs.
RAM is used to store user or application programs. In PC system, RAM is also
used to store disk operating system software temporarily.
Data Memory : It is used to store data (operands and results). It consists of ROM and
RAMS chips.
ROM is used to store fixed data like look up tables, codes constants, etc.
RAM is used to store variable data.
RAM can be used as a scratch pad
memory.
Stack Memory
It is used by the CPU to store contents of
registers temporarily. It contains only RAM
chips. It operates in LIFO mode (Last In First
Out mode) i.e. it can read saved byte first. This
is the property of the Stack as shown in Fig.
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 4
Chapter-1 Basic of Microprocessor
Memory unit consists of memory locations. So, each location is used to store one
word of program or data. In a microcomputer, the secondary memories like floppy
disk, hard disk are not treated as memory units, but are treated as I/O peripherals.
I/O unit
It is used to interface external peripherals to the microprocessor. It provides I/O ports
and interface circuitry.
I/O ports are used to transfer binary information between the microprocessor
and the peripherals.
The interface circuitry converts voltages and currents of the external peripheral
into digital form or vice versa.
The microprocessor may communicate with external peripherals via two or
more I/O ports.
The I/O unit can be implemented b using buffers, latches and LSI or VLSI
interface chips.
Input unit is used by I/O peripherals like keyboard while the Output unit is
used to interface output peripherals like display.
There are two types of I/O units viz, general purpose and special purpose.
I. The general purpose I/O unit is used to interface any type of peripherals while
II. special purpose I/O unit is used to interface specific types of peripherals,
example is printer interface unit which is used to interface a printer. So, the
I/O unit is an important part of the microcomputer.
System bus
It is a group of conductors. It is used to transfer information (electrical signal )
between two units. It consists of Data Bus, Address Bus and Control Bus.
Data bus : It is a bidirectional bus. It is used to transfer data between two units. The
length of a microcomputer depends upon the width of the Data Bus (number of data
lines). It has three levels, viz. Logic 0, logic 1 and HIGH IMPEDANCE.
Control bus : It consists of input and output control signals. The main control
signals are Read and Write. These signals are used to control the operation of the
microcomputer. It is also used to synchronize all operations.
Bus Slave
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 5
Chapter-1 Basic of Microprocessor
It is a device which responds to the Bus Master. It accepts address and control
signals from the Bus Master. It does not control timings and events of the
microcomputer, examples are memory unit and I/O unit.
In a single board microcomputer, all units are mounted on one PCB, while in a
multiboard computer, CPU, some part of the memory and I/O are mounted on the
main board (mother board)and additional memories and special purpose I/O
interfaces are mounted on small PCBs adaptor cards).
Characteristics Microcomputer
Most of the characteristics of a microcomputer depend upon the following
parameters of the microprocessors
Word Length
The word length of a microcomputer depends upon the width of the Data Bus.
The word length of a memory unit depends upon the number of data
lines provided by the microprocessor.
The word length of the I/O unit is not fixed. It varies from peripherals to
peripherals, for example we can connect an 8 bit I/O unit to a 16 bit
microcomputer. Nowadays, the basic unit of word length is bytes.
Processor to memory band width : This parameter decides the speed of
microcomputer. ,.I
It is the number of bytes to be transferred between.,a microprocessor and
the memory.
This parameter depends upon the memory access time of a
microprocessor, band width of the PCB (maximum frequency of PCB) and
word length.
This bandwidth should be maximum. The band width is measured in
terms bytes/second.
Memory storage capacity : The maximum size of memory unit depends upon the
number of address lines provided by the microprocessor,
Example
N = 2K where N is the number of memory locations and k is the number of address
Lines.
I/O unit capacity : The maximum size of the VO unit depends upon the number of
I/O address bits available in I/O instructions,
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 6
Chapter-1 Basic of Microprocessor
N = 2P where N is the number of I/O ports and P is the number of address bits
present in at I/O instruction.
Application of Microprocessor
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 7
Chapter-1 Basic of Microprocessor
Microprocessors are used in Dedicated Controllers, Personal Computers, low to
moderate speed data communication peripherals, Instrumentation point of sale
terminals, replacement of microcomputers and replacement of random logic, etc.
Application of up are
1.Microprocessor based dedicated systems
2.Personal computer and Workstation
3.Ciommunication system
4.Automobiles
5.Medical instruments
6.Peripherals
7.Replacement of random logic
8.Telex system
Evolution of Microprocessor
Before 1950, the CPU of the microcomputer was implemented by using discrete
components like transistors, diodes and resistors, etc. The first IC appeared on the
scene at the end of 1950s in the form of logic gates. This type of IC is called a Small
Scale Integrated circuit (SSI).
But the IC designer could fabricate many more logic gates on one chip by 1960.
Hence, Medium Scale Integrated (MSI)chips and Large Scale Integrated (LSI) chips
came into the Nowadays, IC manufacturers are manufacturing VLSI (Very Large Scale
Integrated circuits) and ULS1 (Ultra Large Scale Integrated circuits) ICs.
In 1971, Intel introduced a group of four LSI devices that made up a simple but
complete computer MCS-4.
The MCS-4 consists of 4 bit CPU namely 4004. The other components in the
set were a 4001 ROM, a 4002 ROM and a 4003 shift register. The 4004 consists of an
ALU and a control unit. It provides only 45 instructions. The 4001 contains 4 bit I/O
ports.
After the MCS-4, three other General Purpose microprocessors were introduced
viz, the Rockwell International 4 bit PPS-4, the Intel 8 bit 8008 and National
semiconductor 16 bit zmp-16.
The microprocessors introduced between 1971 and 1973 were the first generation
systems. They were designed using the PMOS technology.
In the mid of 1970s, the Intel introduced 8080 microprocessor.
After 1973, the second generation microprocessors such as the Motorola 6800
and 6809, Intel 8085 and Zilog Z80 evolved. These processors were fabricated using
the NMOS technology.
The 8085 is improved version of 8080. The 8085 and Z-80 were designed as
upward compatible with the 8080 (i.e. we can execute 8080 programs on 8085 and Z-
80, reverse is not possible).
After 1978, the third generation microprocessors were introduced. These
processors were 16 bits wide, examples are the Intel 8086, 80186, 80286 and the
Motorola 68000/68010.
These microprocessors were designed using the HMOS (High density MOS)
technology. The HMOS is four times faster than NMOS. The density of HMOS is also
doubled.
In 1980, the fourth generation microprocessors evolved. Intel introduced the
first 32 bit viz. Intel 486.
In 1985, Motorola M6 68020/68030/68040 and the Intel 80386/80486 were
introduced.
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 8
Chapter-1 Basic of Microprocessor
They provide cache memory features. Also, Intel and Motorola introduced a 32 bit
RISC (Reduced Instruction Set Computer) microprocessor (Intel 80960 and Motorola
88100) with simplified instruction sets.
In 1993, the IBM/Apple introduced the Power PC 603 processor having (64 bit
Data Bus).
In 1998, Intel introduced the Pentium and Celeron processors.
Nowadays, Intel processors like Pentium I Pentium III and Pentium IV have captured
the whole market of microprocessors.
Functional Description
8085 is an 8-bit general purpose µp capable of addressing 64-kbytes of
memory and 256 I/O device. This device has 40 pins, require +5v supply and can
operate with 3.125mhz single phase clock . figure shows the logic or functional pin
out of 8085 µp. All 40 signals are classified into 6 groups those are
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 9
Chapter-1 Basic of Microprocessor
1.Address bus
2.Multiplexed address data bus
3.Control and status signal
4.Power supply and frequency signal
5.Interrupt and peripheral initiated signal
6.Serial IO signal
IO/M S1 S0 Status
0 0 1 Memory write
0 1 0 Memory read
1 0 1 I/o write
1 1 0 I/o read
0 1 1 Opcode fetch
1 1 1 Interrupt acknowledge
* 0 0 Halt
* X X Hold
* X X Reset
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 11
Chapter-1 Basic of Microprocessor
* - tri state (high impedance) X - unspecified
Activities can be decoded. Table shows the machine cycle status. Most 8085 circuits
do not make use of the status pins. i.e rarely used
IV) Power Supply And Clock Frequency Signals
To make µp compatible with TTL power supplies, the 8085 requires only a VCC
of +5v and ground. Ground is called VSS (substrate voltage) because the 8085 is a
MOS device.
VCC ( pin 40) : +5 volt power supply
VSS ( pin 20) : Ground reference .All signals are measured or checked with respect
to this pin.
X1 ,X2 (PIN 1,2 ):The 8085 does not require an external clock generator ,crystal is
connected between the X1 and X2 inputs of the 8085. The input frequency of the
crystal is divided by 2 to produce the internal reference frequency. The CLK OUT is a
same frequency of the 8085's internal clock. It is used to synchronize the rest of
system to the 8085. Maximum operating clock frequency of 8085 is 3.125 Mhz.
Which can be obtain by connecting crystal of 6.25 Mhz between X1 and X2.
V) Externally Initiated Signals Including Interrupt Signals
8085 has five hardware interrupt signals that can be used to interrupt the
program execution .these signals are
1.Trap
2.RST 7.5
3.RST 6.5
4.RST 5.5
5.INTR /INTA
And three externally initiated signal those are
1.Ready
2.Reset ( Reset in and Reset out)
3.Hold / HLDA
TRAP ( PIN 6 )
Trap is highest priority , Nonmaskable interrupt .when trap is received , µp
starts the program execution from location (4.5 * 8 )h. i.e why trap is called as
vectored interrupt.
RST 7.5 , 6.5 , 5.5 ( pin 7,8,9)
This are restart interrupts or vectored interrupt when recognized by µp ,µp
start program execution from fixed memory location listed below. This are maskable
interrupts and has priority lower than trap ,but among themselves RST 7.5 has
highest priority followed by 6.5 and 5.5.
INTR ( PIN 10 )
Interrupt request signal used as general purpose interrupt .it has lowest
priority and it is maskable interrupt.
INTA (PIN 11 )
This is active low signal. This signal is acknowledgement sent by µp when INTR
is recognized .interrupt acknowledge is used instead of RD during the instruction
cycle after an INTR is accepted.
READY ( PIN 35 )
It is used by µp to sense whether a peripheral is ready for data transfer. If
ready is high during a read or write cycle, it indicates that the memory or peripheral
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 12
Chapter-1 Basic of Microprocessor
is ready to send or receive data. If ready is low, the CPU will wait till ready to go high
before completing the read or write cycle .Basically this signal is used to delay the µp
read / write cycle and to interface slower peripherals.
RESET Signal
Reset in ( PIN 36 ) : This signal may activated by reset button or other source.
When reset in is at an active-low level, the internal operation of microprocessor stops.
During reset the program counter is set to 0000h. It also sends a high signal to reset
out. When reset in goes to inactive-high level, the 8085 will fetch an instruction from
memory location 0000h. When 8085 is reset the following events occur :
1. Program counter is reset to 0000h.
2. The instruction register is cleared.
3. Interrupts are disabled.
4. The RST7.5, RST 6.5, RST 5.5 are masked.
5. All tri-state bus lines except ALE are floated.
Reset out(PIN 3) : A high signal on reset out indicates that the CPU is being reset ,i.e
the program counter, instruction register and so on are being reset to zero. The reset
out signal goes to peripheral chips and is used to reset other devices in the system.
Hold ( pin 39 )
This is an externally initiated signal. HOLD indicates that another peripheral
device such as DMA controller is requesting the use of Address and Data buses. The
CPU, upon receiving the Hold request, will relinquish(release) the use of the bus as
soon as the completion of the current bus transfer. It floats Address, Data bus, RD ,
WR, IO/M and ALE Control signals. Internal processing can continue. The processor
can regain the bus only after the hold is removed.
HLDA (pin 38 )
Hold acknowledge indicates that the CPU has received the hold request and that it
will relinquish the bus in the next clock cycle. HLDA goes low after the hold request is
removed.
Serial I/O Signals
The 8085 has two signal for implementing the serial transmission
1.SID ( serial input data )
2.SOD (serial output data )
SID (pin 5 ) : This is a serial input data line. The data on this line is loaded into bit 7
of accumulator whenever a RIM instruction is executed.
SOD (pin 4 ):This is a serial output data line. The output sod is set or reset as
specified by SIM instruction.
Architecture of 8085
8085 is an 8-bit microprocessor , it has 40 pins fabricated on single LSI chip .
8085 operates with single +5V DC supply and its clock speed is about 3.125Mhz
.The architecture shows following functional units :-
1> Timing and Control Unit
2> Arithmetic and Logic Unit
3> Address and Data buffer
4> Instruction Register and Decoder
5> CPU Register Array
6> Interrupt Control and
7> Serial Control
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 13
Chapter-1 Basic of Microprocessor
Temporary Register
Temporary register is 8 bit register. This register stores the operands of
arithmetic and logic operation for short period of times. This register is not available
to the programmer.
Flag Register
The flag register contains five single bit flags, and three unused bits The flags
are affected by the arithmetic and logic operation in ALU. In most of these operation
result is stored in accumulator , therefore the flags generally reflects data condition
in the accumulator with some exception. The five flags are
1. S - Sign Flag
2. Z – Zero Flag
3. Ac-Auxiliary carry Flag
4. P – Parity Flag
5. C – Carry Flag
S Z X AC X P X CY
Carry Flag
Parity Flag
Auxiliary Carry Flag
Zero Flag
Sign Flag
The description and condition of flag are as follows :
Carry Flag(CF) :- The carry flag is set when the result of an operation produces a
number that will not fit into the 8 bit accumulator. Thus the carry flag reflects the
final carry out of the most significant bit of any arithmetic operation .The carry flag
also serves as a borrow for subtraction.
Zero Flag (ZF) :- The zero flag is one of he most useful flag. The zero flag is set if ALU
operation results in 00H. Flag is reset if the result is not 00H.This flag is modified by
the result in the accumulator as well as the other register.
Parity Flag (PF) :- The parity flag is set to 1 if an arithmetic or logic instruction
generates an even number of 1s in accumulator i.e even parity . The flag is 0 if the
arithmetic or logic instruction containing an odd number of 1s, in accumulator i.e
odd parity. The parity flag is the least used of all the flags.
Sign Flag (SF) :- The sign flag is set to the condition of the most significant bit of the
accumulator following the execution of arithmetic or logical instruction. This flag is
used with signed numbers.
In a given byte, if bit 7 is 1, the number is viewed as a negative number and if
bit 7 is 0, the number will be considered positive. In arithmetic operations with
signed numbers, bit 7 is reserved for indicating the sign, and the remaining seven
bits are used to represent the magnitude of a number. Thus a set sign flag represents
a negative number, whereas a reset flag means a positive number.
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 15
Chapter-1 Basic of Microprocessor
Auxiliary Carry (AcF) :-In arithmetic operation if a carry is generated in the digit d3
and passed to digit d4 then Ac flag is set. This flag is commonly used in BCD
arithmetic. This flag is not available for the programmer to change the sequence of
program with a jump instruction.
Question Bank
1. Describe the function of following blocks of 8085.
a) General purpose register
b) ALU
c) Timing and control unit
d) Instruction decoder and machine cycle encoding.
e) Instruction register
f) FLags
2. What is de-multiplexing of the address and data bus? Which signal is
used to de-multiplex the address and data bus.
3. State the vector addresses of all hardware interrupts of 8085
microprocessor.
4. Draw the format of the flag register of 8085 microprocessor and describe
the condition which set and reset these flags.
5. Describe INTR interrupt.
6. List maskable and non-maskable interrupts of 8085 microprocessor.
7. Explain why
a) 8085 microprocessor is 8 bit CPU ?
b) Memory capacity of 8085 microprocessor is 64K bytes?
c) RESET IN signal is essential for microprocessor?
d) First instruction is executed after rest operation from the memory
location 0000H ?
Microprocessor – SY – 2007-2008 (MSK-9860174297 / 9324258878) 18
Chapter-1 Basic of Microprocessor
8. Draw the flag register format and explain in brief various flags related to
8085.
9. Describe TRAP interrupt. State its priority and triggering level.
10. Draw the neat labeled architecture of 8085 indicating different signals of
the all the blocks.
11. Describe the function of SID and SOD pins of 8085 microprocessor.
12. List all registers of the 8085 microprocessor and categorize them into 8
bit and 16 bit registers.
13. State the function of RESET IN and READY pins of 8085 microprocessor.