MP-Unit-1
MP-Unit-1
Lecture
Topics Covered Page No. Total Page
No.
1 Introduction 1-3 3
References:
1. R. Gaonkar, Microprocessor Architecture Programming, Penram International Publishing
2. Hall D.V., microprocessor & Interfacing-Programming & hardware, TMH, 2008
1
2
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
In simple words, a Microprocessor is a digital device on a chip which can fetch instruction from
memory, decode and execute them and give results.
Evolution of Microprocessor
Transistor was invented in 1948 (23 December 1947 in Bell lab).
IC was invented in 1958 (Fair Child Semiconductors) By Texas Instruments J Kilby.
The first microprocessor was invented by INTEL(INTegratedELectronics).
Name Year of Invention Clock Speed Size of MP
1
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
Features of Microprocessor :
Clock speed: One of the earliest features of microprocessors was the clock speed, which refers to
the speed at which the processor can execute instructions. Over time, clock speeds have
increased, with modern processors capable of speeds in the billions of cycles per second (GHz).
Instruction set architecture: Microprocessors have evolved to support different instruction set
architectures, including CISC (complex instruction set computer) and RISC (reduced instruction
set computer), which affect the efficiency and complexity of processing.
Cache memory: Microprocessors now include a cache memory, which is a small amount of high-
speed memory that stores frequently used data for quicker access.
Multi-core processors: Modern microprocessors have multiple cores, allowing for multiple tasks
to be executed simultaneously, increasing performance and multitasking capabilities.
Virtualization: Microprocessors now support virtualization, which enables multiple operating systems to
run on the same physical hardware.
Power management: Modern processors include power management features, which reduce
power consumption and improve energy efficiency.
Graphics processing: Many modern microprocessors include integrated graphics processing units
(GPUs), which allow for faster and more efficient handling of graphics-intensive tasks.
Internet connectivity: Microprocessors now include built-in networking capabilities, such as Wi-
Fi and Ethernet, which allow for seamless internet connectivity.
2
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
3
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
8085 MP Architecture
Lecture-2
4
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
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.
As the name suggests, it performs arithmetic and logical operations like Addition, Subtraction,
AND, OR, etc. on 8-bit data.
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.
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
5
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
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.
Sign (S)
Zero (Z)
Auxiliary Carry (AC)
Parity (P)
Carry (C)
It is an 8-bit register. When an instruction is fetched from memory then it is stored in the
Instruction register. Instruction decoder decodes the information present in the Instruction
register.
It provides timing and control signal to the microprocessor to perform operations. Following are
the timing and control signals, which control external and internal circuits −
Interrupt control
As the name suggests it controls the interrupts during a process. When a microprocessor is
executing a main program and whenever an interrupt occurs, the microprocessor shifts the
control from the main program to process the incoming request. After the request is completed,
the control goes back to the main program.
There are 5 interrupt signals in 8085 microprocessor: INTR, RST 7.5, RST 6.5, RST 5.5, TRAP.
6
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
It controls the serial data communication by using these two instructions: SID (Serial input data)
and SOD (Serial output data).
The content stored in the stack pointer and program counter is loaded into the address buffer
and address-data buffer to communicate with the CPU. The memory and I/O chips are connected
to these buses; the CPU can exchange the desired data with the memory and I/O chips.
Data bus carries the data to be stored. It is bidirectional, whereas address bus carries the location
to where it should be stored and it is unidirectional. It is used to transfer the data & Address I/O
devices.
7
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
8
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
Interfacing Types:
There are two types of interfacing in context of the 8085 Microprocessor. Memory Interfacing &
I/O Interfacing.
1. Memory Interfacing:
Memory is an integral part of a microprocessor system, and in this section, we will discuss how to
interface a memory device with the microprocessor. The Memory Interfacing in 8085 is used to
access memory quite frequently to read instruction codes and data stored in memory. This
read/write operations are monitored by control signals. The microprocessor activates these
signals when it wants to read from and write into memory.
In the last section we have already seen the memory read and memory write machine cycles, and
status of the RD, WR and IO/M status signals for read/write operation. In the following section
we will see memory structure and its requirements, concepts in Memory Interfacing in 8085 and
interfacing examples.
As mentioned earlier, read/write memories consist of an array of registers, in which each register
has unique address. The size of the memory is N x M as shown in Figure below where N is the
number of registers and M is the word length, in number of bits.
9
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
For Memory Interfacing in 8085, following important points are to be kept in mind.
1. Microprocessor 8085 can access 64Kbytes memory since address bus is 16-bit. But it
is not always necessary to use full 64Kbytes address space. The total memory size depends upon
the application.
2. Generally EPROM (or EPROMs) is used as a program memory and RAM (or RAMs) as
a data memory. When both, EPROM and RAM are used, the total address space 64Kbytes is
shared by them.
3. The capacity of program memory and data memory depends on the application.
4. It is not always necessary to select 1 EPROM and 1 RAM. We can have multiple
EPROMs and multiple RAMs as per the requirement of application.
But program memory (EPROM) should be located from address 0000H since reset address of
8085 microprocessor is 0000H.
6. It is not always necessary to locate EPROM and RAM in consecutive memory For
example: If the mapping of EPROM is from 0000H to OFFFH, it is not must to locate RAM from
1000H. We can locate itanywhere between 1000H and FFFFH. Where to locate memory
component totally depends on the application.
10
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
Bus System
Lecture-4
1. Address Bus
2. Data Bus
3. Control Bus
1. Address Bus:- Generally, the Microprocessor has a 16-bit address bus. The bus over which
the CPU sends out the address of the memory location is known as the Address bus. The
address bus carries the address of the memory location to be written or to be read from.
The address bus is unidirectional. It means bits flowing occurs only in one direction, only from
microprocessor to peripheral devices.
We can find how much memory location it can use the formula 2^N. where N is the number of bits
used for address lines.
Q.>If a processor has 4 GB memory then how many address lines are required to access this
memory?
Ans: 4GB= 4 * 1GB
4 = 2^2
11
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
1GB = 2^30
2. Data Bus:- 8085 Microprocessor has an 8-bit data bus. So it can be used to carry the 8-bit data
starting from 00000000H(00H) to 11111111H(FFH). Here ‘H’ tells the Hexadecimal Number. It is
bidirectional. These lines are used for data flowing in both directions means data can be
transferred or received through these lines. The data bus also connects the I/O ports and CPU. The
largest number that can appear on the data bus is 11111111.
It has 8 parallel lines of data bus. So it can access up to 2^8 = 256 data bus lines.
3. Control Bus:- The control bus is used for sending control signals to the memory and I/O
devices. The CPU sends a control signal on the control bus to enable the outputs of
addressed memory devices or I/O port devices.
Some of the control bus signals are as follows:
1. Memory read
2. Memory write
3.I/O read
4.I/O writ
12
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
Figure:8085PinDiagram
Allsignalscanbeclassifiedintosixgroups:
1. AddressBus
2. DataBus
3. Control&StatusSignals
4. PowerSupply&Frequencysignals
5. Externallyinitiatedsignals
13
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
6. SerialI/OPorts
3) Control&StatusSignals
Toidentifynatureofoperation
TwoControlSignals
1) RD’(Read-pin32)
Thisisareadcontrolsignal(activelow)
ThissignalindicatesthattheselectedI/OorMemorydeviceistoberead&dat
aareavailableondatabus.
2) WR’(Write-pin31)
Thisisawritecontrolsignal(activelow)
ThissignalindicatesthattheselectedI/OorMemorydeviceistobewrite.
ThreeS
tatusSi
gnals
1) S1
(pin
33)
2)S0(pin29)
S1andS0statussignalscanidentifyvariousoperations,buttheyarerarelyusedinsm
all systems.
S1 S0 Mode
0 0 HLT
0 1 WRITE
1 0 READ
1 1 OPCODEFET
CH
14
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
3) IO/M’(pin34)
ThisisastatussignalusedtodifferentiateI/Oandmemoryoperation
15
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
Whenitishigh,itindicatesanI/Ooperation
Whenitislow,itindicatesamemoryoperation
ThissignaliscombinedwithRD’andWR’togenerateI/O&memorycontrolsignals
Toindicatebeginningofoperation
o OneSpecialSignalcalledALE(AddressLatchEnable-Pin 30)
o Thisispositivegoingpulsegeneratedeverytimethe8085beginsanoperation(machinec
ycle)
o ItindicatesthatthebitsonAD7-AD0areaddressbits
o Thissignalisusedprimarilytolatchthelow-
addressfrommultiplexedbus&generateaseparatesetofaddresslinesA7-A0.
4) PowerSupply&FrequencySignal
VccPinno.40,+5VSupply
VssPinno.20,GroundReference
X1,X2Pinno.1&2,CrystalOscillatorisconnectedatthesetwopins.Thefrequencyisi
nternallydividedbytwo;Therefore,to operate a system
at3MHz,thecrystalshouldhaveafrequencyof6MHz.
CLK(OUT)
Clockoutput.PinNo.37:Thissignalcanbeusedasthesystemclockforotherd
evices.
5) ExternallyInitiatedSignalsincludingInterrupts
INTR(Input) InterruptRequest.Itisusedasgeneralpurposeinterrupt
INTA’(Output) InterruptAcknowledge.Itisusedtoacknowledgeaninterrupt.
RST7.5,RST6.5,RST5.5(Input) RestartInterrupts.
o Thesearevectorinterruptsthattransfertheprogramcontroltospecificmemorylocations.
o TheyhavehigherprioritiesthanINTRinterrupt.
o Amongthese3interrupts,thepriorityorderisRST7.5,RST6.5,RST5.5
TRAP(Input) Thisisanonmaskableinterrupt&hasthehighestpriority.
HOLD(Input)
ThissignalindicatesthataperipheralsuchasDMAContro
llerisrequestingtheuseofaddress&databuses
HLDA(Output) HoldAcknowledge.ThissignalacknowledgestheHOLDrequest
READY (Input)This signal is used to delay the microprocessor read or
writecycles until as low- responding peripheral is ready to send or accept data.
Whenthe signal goes low, the microprocessor waits for an integral no. of clock
cyclesuntilitgoeshigh.
RESETIN’(Input)Whenthesignalonthispingoeslow,theProgramCounterissettozero
,thebusesaretri-statedµprocessorisreset.
RESETOUT(Output) This signalindicatesthatmicroprocessorisbeing
16
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
reset.Thesignalcanbeusedtoresetotherdevices.
6) SerialI/O Ports
Twopinsforserialtransmission
1) SID(SerialInputData-pin5)
2) SOD(SerialOutputData-pin4)
Inserialtransmission,databitsaresentoverasingleline,onebitatatime.
17
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
Address latch enables (ALE) signal is used to demultiplex the address/data bus. the below figure
shows the schematic of demultiplexing of address/data bus (AD0 – AD7) using a latch IC
(74LS373). the multiplexed address/data bus (AD0 – AD7) is connected as the input to the 8-bit
latch IC (74LS373). the enable input (G) of latch IC is connected to the ALE pin of the
microprocessor whereas the output control (OC) pin is grounded.
18
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
19
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
Functions of Control Pins: IO/M’ – It is a status signal which determines whether the
address is for input-output or memory. When it is high (Logic 1) the address on the address
bus is for input-output devices. When it is low (Logic 0) the address on the address bus is
for the memory. • RD’ – It is a signal to control READ operation. When it is low the selected
memory or input-output device is read. • WR’ – It is a signal to control WRITE operation.
When it goes low the data on the data bus is written into the selected memory or I/O
location.
3:8 Decoder A 3 to 8 line decoder IC 74138 is used. It has 3-inputs and 8-outputs. Three
signals from the 8085 microprocessor namely read (RD’), write (WR’) and Input
Output/Memory (IO/M’) are connected as input to the decoder. Four output signals are
taken from output pins of decoder.
Control Signals The table list input conditions required or different inputs. • S1, S0 – These
are status signals. They distinguish the various types of operations such as halt, reading,
instructions fetching or writing. • RD’, WR’ – Read and write are two basic control signals for
reading and writing operations respectively.
20
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
21
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
22
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
T states in Microprocessor
23
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
4. ALE – It provides the signal for multiplexed addresses and data buses.
If the signal is high or 1, a multiplexed address and data bus will be
24
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)
Unit-1 B. Tech. IV Sem CSE Introduction & Architecture of 8085
25
Notes By: Dr. Neeraj Jain (Dean Exam & Associate Professor CSE)