Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Copy of CS2 CH1-Introduction to 8085 Microprocessor (1)

The document provides an overview of microprocessors, specifically the 8085 microprocessor, detailing its definition, functions, evolution across five generations, and bus structure. It explains the programming model, including registers, flags, and the interrupt system, highlighting hardware and software interrupts, as well as their priorities. Additionally, it includes diagrams and board questions related to the microprocessor's organization and operations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Copy of CS2 CH1-Introduction to 8085 Microprocessor (1)

The document provides an overview of microprocessors, specifically the 8085 microprocessor, detailing its definition, functions, evolution across five generations, and bus structure. It explains the programming model, including registers, flags, and the interrupt system, highlighting hardware and software interrupts, as well as their priorities. Additionally, it includes diagrams and board questions related to the microprocessor's organization and operations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Std : 12th Year : 2020-21

Subject : Computer Science - II


Chapter : Introduction to Microprocessors
and Organization of 8085
SUB TOPIC : Introduction/Functions/Evolution/
Bus Structure of Microprocessor/
Block Diagram of Microcomputer/ Programming
Model / Interrupts/ Pin Diagram/ Functional Block
Diagram of 8085 Microprocessor
Definition of Microprocessor
A Microprocessor is a semiconductor, multipurpose,
programmable logic device that reads binary instructions
from a storage device called memory, accepts binary data
as input, and processes the data according to the
instructions and provides result as output.
e.g
2 + 3=5
2 and 3 are binary data(operand)
‘+ ‘ binary instruction stored in memory(opcode)
and 5 is processed data or result as output
Block Diagram of Microprocessor
A Microprocessor can be roughly divides into
three parts:
• ALU (Arithmetic Logic Unit)
• Registers
• Control Unit

ALU is arithmetic and logic unit, where arithmetical and logical operations
are carried out.
Registers are primarily used to store data temporarily during execution of
program.
Control unit provides timing and control signals to the whole system. It
also controls flow of data.
Difference between Microprocessor
and Microcomputer
Microprocessor Microcomputer
Functions of Microprocessor

• To fetch , decode and execute instructions.


• To transfer data from one block to another
block or from one block to I/O lines.
• To give proper response to different externally
produced interrupts according to their priority.
• To provide control and timing signals to the whole
system according to the instructions.
Evolution of Microprocessors
We divide the years of development of microprocessors as
FIVE Generations
First generation (1971 – 1973)
• Intel introduced 4004, a 4-bit first microprocessor in 1971.
• It was designed to used in calculators.
• In 1972 Intel introduced 8008, the first general purpose 8-bit Microprocessor with
the development of LSI technology with 45 instructions.
• It was followed by Intel 8080 in 1973 and Motorola‘s 6800 in the same year.

Second Generation (1974 – 1977)


• In 1976, Intel 8085 was introduced. It is 8-bit microprocessor.
• During second generation, the development of microprocessor has been in a
direction to complete microprocessor system(microcontroller) i.e CPU,ROM,RAM,
clock, I/O ports all in single package
Evolution of Microprocessors
Third Generation (1978- 1980)
• Intel introduced first 16-bit microprocessor 8086 in 1978.
• In third generation, memory space was 64KB. The other features were full
arithmetic execution and efficient higher level language addressing.
• Other microprocessors are Zilog’s Z-8000, Motorola’s 68000

Fourth Generation (1981- 1992)


• In 1981, Intel introduced first 32-bit Microprocessor 80386. It can address physical
memory of 4GB.
• Other microprocessors are 80486, HP-32, Motorola’s 68020

Fifth Generation (1993- till now)


• Intel made drastic improvement in Microprocessor design to provide high speed.
• Also system can run on new OS like UNIX, LINUX etc.
• The processor in this generation is called PENTIUM. It is 64-bit Microprocessor.
• E.g Pentium I, II, III, IV, CORE 2 DUO, CORE i3, i5, i7 .
Bus Structure of 8085 Microprocessor
Bus is a group of conducting wires which carries information, all
the peripherals are connected to microprocessor through Bus.
There are three buses in Microprocessor:
• Address Bus
• Data Bus
• Control Bus
Bus Structure of 8085 Microprocessor
Address Bus:
• It is a group of conducting wires which carries address
only.
• Address bus is unidirectional
• Length of Address Bus of 8085 microprocessor is 16 Bit.
• The Length of the address bus determines the amount
of memory a system can address. Address bus of 8085
is 16-bit means it can address 216 =65536 or 64KB.
• Address range in hexadecimal is 0000H to FFFFH
Bus Structure of 8085 Microprocessor
Data Bus:
• It is a group of conducting wires which carries data
only.
• Data bus is bidirectional
• Length of Data bus of 8085 microprocessor is 8-Bit.
• The Length of the data bus determines the word length
of the microprocessor. Data bus of 8085 is 8-bit means
it can word ranges 28 =256.
• Data range in hexadecimal is 00H to FFH
Bus Structure of 8085 Microprocessor
Control Line:
It is used to generate timing and control
signals to control all the associated
peripherals connected with microprocessor.
Display of 80885 Microprocessor
Block Diagram of Microcomputer
Board Questions

1. What is Microprocessor? List it Functions.


2. Write a short note on evolution of
Microprocessor giving one example of each
Generation.
3. What is bus? Describe the bus structure of
8085 microprocessor.
4. Draw neat and labeled diagram of
microcomputer.
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
General Purpose Registers
• The 8085/8080A has six general-purpose,
programmable registers to store 8-bit data.
• These are identified as B,C,D,E,H, and L.
• They can be combined as register pairs - BC, DE,
and HL - to perform some 16-bit operations.
• The programmer can use these registers to store
or copy data into the registers by using data copy
instructions.
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Accumulator
• It is 8-bit register. It is represented by A.
• This register is a part of ALU.
• This register is used to store 8-bit data and to perform
arithmetic and logical operations. One of the operand
should be stored in Accumulator The final result of an
operation is stored in the accumulator.
• Used to set status of flag register.
• to transfer data serially on SID and SOD pins.
• Used in RIM and SIM instructions to read or set the
interrupts
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Flags
• The ALU includes five flip-flops, which are set or reset after
an operation according to data conditions of the result in the
accumulator and other registers.
• These flags have critical importance in the decision-making
process of the microprocessor.
They are called
• Zero(Z),
• Carry (CY)
• Sign (S)
• Parity (P)
• Auxiliary Carry (AC)
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
• Sign Flag (S) – After any operation if the MSB or D7 of the result is 1, it
indicates the number is negative and the sign flag becomes set, i.e. 1. If the MSB is
0, it indicates the number is positive and the sign flag becomes reset i.e. 0
• Zero Flag (Z) – After any arithmetical or logical operation if the result is 0
(00)H, the zero flag becomes set i.e. 1, otherwise it becomes reset i.e. 0.
• Auxiliary Carry Flag (AC) – This flag is used in BCD number system(0-9). If
after any arithmetic or logical operation D3 bit generates any carry and passes on
to D4 bit this flag becomes set i.e. 1, otherwise it becomes reset i.e. 0. This is the
only flag register which is not accessible by the programmer
• Parity Flag (P) – If after any arithmetic or logical operation the result has even
parity, an even number of 1 bits, the parity register becomes set i.e. 1, otherwise it
becomes reset i.e. 0.
• Carry Flag (CY) – Carry is generated when performing n bit operations and the
result is more than n bits, then this flag becomes set i.e. 1, otherwise it becomes
reset i.e. 0.
During subtraction (A-B), if A>B it becomes reset and if (A<B) it becomes set.
Carry flag is also called borrow flag.
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Program Counter (PC)
• This 16-bit register deals with
sequencing the execution of instructions.
• This register is a memory pointer.
Memory locations have 16-bit
addresses, and that is why this
is a 16-bit register.
• The function of the program counter
is to point to the memory address
from which the next byte is to be
fetched. When a byte (machine code) is
being fetched, the program counter is
incremented by one to point to the next memory location
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
Stack Pointer (SP)
• The stack is a reserved area of the memory in RAM
where we can store temporary information.
Interestingly, the stack is a shared resource as it can be
shared by the microprocessor and the programmer.
The programmer can use the stack to store data. And
the microprocessor uses the stack to execute
subroutines.
• The stack pointer is a 16-bit register used as a memory
pointer for stack memory. The beginning of the stack is
defined by loading 16-bit address in the stack pointer.
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
• Push Operation
During Push operation stack pointer is
decremented by two.
Programming Model of 8085 Microprocessor
Or
Register Organization of 8085 Microprocessor
• Pop operation
During Pop operation stack pointer is
incremented by two.
Board Questions
Q.1 Draw programming model of Intel 8085 with function of each register.
Q.2 What are flags? Enlist the different flags provided by 8085
microprocessor. Explain when they are set or reset.
Q.3 The flag register of 8085 microprocessor contains the data 95H.
Interpret its meaning.
Q.4 The flag register of 8085 microprocessor contains the data BCH.
Interpret its meaning.
Q.5 If the content of accumulator is CBH and the content of register B is
E9H. What will be the status of all flags of 8085 microprocessor after
execution of an instruction ADD B.
Q.6 If the content of accumulator is 37H and the content of register C is
40H. What will be the status of all flags of 8085 microprocessor after
execution of an instruction SUB C.
Q.7 Write the functions of Accumulator.
Q.8 Write a short note on
(a) Program Counter (b) Stack Pointer
Interrupt System of 8085 Microprocessor
• An interrupt can also be viewed as signal, which suspends
the normal sequence of microprocessor and then
microprocessor gives service to that device which has given
the signal. After completing the service, microprocessor
again return to the main program.
Interrupt System of 8085 Microprocessor

• An interrupt is a subroutine called, initiated by


external device through hardware(hardware
interrupt) or microprocessor itself(software
interrupt).
• An interrupt is an input signal which transfers
control to specific routine known as Interrupt
Service Routine(ISR).After executing ISR, control
is again transfer to main program.
• Microprocessor is connected to different devices.
To communicate with these devices,
microprocessor 8085 uses interrupt method.
Interrupt System of 8085 Microprocessor
Interrupts can be of two types:
Hardware and Software Interrupts

Hardware Interrupts
Some pins on the 8085 allow, peripheral device to interrupt
the main program for I/O operations. These Types of Interrupts
in 8085, where CPU pins are used to receive interrupt requests,
are called hardware interrupts. There are 5 Hardware
Interrupts in 8085 microprocessor. They are – INTR, RST 7.5,
RST 6.5, RST 5.5, TRAP
Software Interrupts
Software Interrupts are those which are initiated by
microprocessor itself. These are inserted in between the
program which means these are mnemonics of microprocessor.
There are 8 software interrupts in 8085 microprocessor. They
are – RST 0, RST 1, RST 2, RST 3, RST 4, RST 5, RST 6, RST 7.
Interrupt System of 8085 Microprocessor

Priority of Interrupts –
When microprocessor receives multiple interrupt requests
simultaneously, it will execute the interrupt service request
(ISR) according to the priority of the interrupts.

All software interrupts have


higher priority than hardware
interrupt
Interrupt System of 8085 Microprocessor
Vectored and Non-Vectored Interrupts –
Vectored Interrupts are those which have fixed vector address (starting
address of sub-routine) and after executing these, program control is
transferred to that address.
Vector Addresses are calculated by the formula 8 * TYPE
INTR is a non-Vectored interrupt.
After receiving INTA (active low) signal,
it has to supply the address of ISR
Interrupt System of 8085 Microprocessor

Maskable and Non-Maskable Interrupts

Maskable Interrupts are those which can be disabled


or ignored by the microprocessor. INTR, RST 7.5, RST
6.5, RST 5.5 are maskable interrupts in 8085
microprocessor.

Non-Maskable Interrupts are those which cannot be


disabled or ignored by microprocessor. TRAP is a
non-maskable interrupt. All software interrupts are
non-maskable interrupt.
Organization of ALU
Block Diagram of ALU Organization
Organization of ALU
The ALU contains:
a. Adder
b. Shifter
c. Status Register
Adder performs arithmetic operations like addition, subtraction,
increment, decrement etc with the result being fed back into
accumulator via internal bus.
Shifter performs logical operations like rotate, compare, AND, OR,
XOR, Complement etc. Result again stored into accumulator.
Status register or condition code register contain group of
individual flip-flops that can be set or reset based on the
conditions created by the last ALU operation.
The temporary register and accumulator registers are many time
considered to be part of ALU.
Board Questions
Q.1 What is an Interrupt ? Explain all 8085 hardware and
software interrupts with their priorities and vector
addresses.

Q.2 Differentiate between hardware and software


interrupts of 8085 microprocessor.

Q.3 Differentiate between maskable and non- maskable


interrupts.

Q.4 Explain organization of ALU with the help of simple


block diagram.
Pin Diagram of 8085 Microprcoessor
Pin Diagram of 8085 Microprcoessor
X1 X2 (Pin No 1 & 2): These are the 2 clock-input pins which are connected
across a crystal RC\LC Circuit of 6MHz Frequency.
Whenever the microprocessor requires a clock-frequency of 3MHz, these 2
clock-input pins divides the crystal-frequency into 2 parts in the internal
circuitry & supplies the 1st 3MHz of frequency to the microprocessor, while
the 2nd 3MHz of Frequency is used as an operating frequency to synchronize
the operations of 8085 Microprocessor.
Pin Diagram of 8085 Microprcoessor
CLK (Pin No. 37)
It is output clock-signal which is used as a
system-clock.
An Internally Operating 3MHz Frequency
obtained from the crystal-connected clock-
input pins X1& X2 is stored in this pin which is
used to operate other peripheral devices in
the system with the same speed.
Pin Diagram of 8085 Microprcoessor
RE͞ ͞SE͞ ͞T-IN
͞ (Pin No. 36)
• It is an active-low input reset-acknowledgement-signal used to reset the
microprocessor & pass an acknowledgement to RESET OUT signal which indicates
that the CPU has been Reset.
• When this signal is received by the microprocessor, the address-lines, data-
lines & control-lines gets tri-stated & the memory-location of program-counter i.e.
0000H is cleared along with the flag-register & temporary-registers.
• After this process, the program-counter is reset where it starts executing
from the Starting memory-location 0000H onwards.

RESET OUT (Pin No. 3)


• This is an active high output signal which is synchronized to the processor clock of
Microprocessor.
• Whenever the microprocessor gets the reset-acknowledgement-signal RE͞ ͞S͞ET͞ -I͞N, it
sends the output signal RESET-OUT to reset the microprocessor which resets all
the connected devices & indicates that the CPU has been Reset.
Pin Diagram of 8085 Microprcoessor
SOD (Serial Output Data) Pin No 4:
• It is an active high serial output line used for serial data communication.
• It provides the data serially given by Microprocessor & delivers its output
to the 7th bit of the Accumulator and transfer to peripheral when (Set
Interrupt Mask) SIM instruction is executed.
Pin Diagram of 8085 Microprcoessor
SID (Serial Input Data) Pin No 5:
• It is an active high Serial input data line used for serial data
communication.
• It accepts the serial-data & loads it into the 7th bit of the Accumulator
whenever a (Read Interrupt Mask) RIM instruction is executed.
Pin Diagram of 8085 Microprcoessor
TRAP (Pin No. 6)
It is a non-maskable interrupt, having the highest priority among all interrupts. When this
interrupt is executed, the processor saves the content of the PC register into the stack and
branches to 0024H address.

RST7.5 (Pin No. 7)


• It is a maskable interrupt, having the second highest priority among all interrupts. When this
interrupt is executed, the processor saves the content of the PC register into the stack and
branches to 003CH address.

RST 6.5 (Pin No. 8)


• It is a maskable interrupt, having the third highest priority among all interrupts. When this
interrupt is executed, the processor saves the content of the PC register into the stack and
branches to 0034H address.

RST 5.5 (Pin No. 9)


• It is a maskable interrupt. When this interrupt is executed, the processor saves the content of
the PC register into the stack and branches to 002CH address.
Pin Diagram of 8085 Microprcoessor
INTR( Pin No 10) and INTA’(Pin No. 11)
• It is a maskable interrupt, having the lowest priority among all interrupts.
It can be disabled by resetting the microprocessor.

• When INTR signal goes high, the following events can occur −

1. The microprocessor checks the status of INTR signal during the


execution of each instruction.

2. When the INTR signal is high, then the microprocessor completes its
current instruction and sends active low interrupt acknowledge
signal(INTA’)

3. When instructions are received, then the microprocessor saves the


address of the next instruction on stack and executes the received
instruction.
Pin Diagram of 8085 Microprcoessor
AD0-AD7(Pin No. 12 to 19):

• These are the 8-bit bi-directional multiplexed, tri-state input pins


which contains 2 sets of signals 1) Address & 2) Data.
• These set of lines used to carry the lower order 8-bit address as
well as 8-bit data bus.
• Here, the lower 8 bit of 16 bit address is multiplexed/time shared
with data bus , because , at one-time , 8-bit lower-address of
memory is available on these lines & at another time the next 8-bit
data is available.

A8-A15(Pin No. 21 to 28):

These are the 8-bit uni-directional non-multiplexed, tri-state output


pins used to carry higher order address-signals of 16-bit Address.
Pin Diagram of 8085 Microprcoessor
Demultiplexing of Address and Data Bus
OR
Pin Diagram of 8085 Microprcoessor
ALE ( Address Latch Enable) Pin No.30
• It is an output signal used to give information of AD0-
AD7 Contents & separate Address-Signals (A0-A7) &
Data-Signals (D0-D7) from AD0-AD7 pin.
• It is a positive going pulse generated, when a new
operation is started by Microprocessor.
• When ALE is low, it indicates that the content on AD0-
AD7 lines is the 8-bit data.
• When ALE goes high, it indicates that the content on
AD0-AD7 lines is in lower-order 8-bit address of 16-bit
address.
Pin Diagram of 8085 Microprcoessor
Instruction Cycle:
Instruction cycle is the time required to complete the execution of an instruction.
The 8085 instruction cycle consists of one to five machine cycle.
Machine Cycle
Machine Cycle is defined as the time required to complete any operation of
accessing either memory or I/O which is the sub-part of an operation. Machine
cycle consists of one to five T-states.

T-State
The sub-division
of an operation, which
is performed in one clock
period is called T-state.
Pin Diagram of 8085 Microprcoessor
S0-S1(Pin No. 29 & 33) :
• S0 and S1 are status signals which provides
different status and functions depending on
their status.
Pin Diagram of 8085 Microprcoessor
IO/M’(Pin No. 34):
This distinguishes whether the address is for memory or I/O.
When this pin goes high, the address is for an I/O device. While the
pin goes low, the address is assigned for the memory.

I/O mapped I/O and Memory Mapped I/O


In Memory Mapped I/O, when an address is used to select I/O
device, then that address is not used for memory location.
8085 uses I/O mapped I/O scheme.

In I/O mapped I/O same address may be used for I/O as well as for
memory location. IO/M’ signal is used to tell whether address on
address bus is for I/O or for memory.
Pin Diagram of 8085 Microprcoessor
• 8-Machine Cycles
Pin Diagram of 8085 Microprcoessor
RD’(Pin No.32)
This signal indicates that the selected I/O or
memory device is to be read and is ready for
accepting data available on the data bus.
WR’(Pin No.31)
This signal indicates that the data on the data
bus is to be written into a selected memory or
I/O location.
Pin Diagram of 8085 Microprcoessor
READY (Pin No. 35):
• It is an active-high, input-control signal pin used by the
microprocessor to check whether the peripheral-
devices is ready to transfer the data or not.
• This signal is also used to synchronize slower
peripheral-devices with the faster peripheral-devices.
• When READY Signal from READY pin is high, then the
microprocessor completes the operation & proceeds
for next operation.
• When READY Signal from READY pin is low, then the
microprocessor will wait until it goes high.
Pin Diagram of 8085 Microprcoessor
HOLD(Pin No 38):
• HOLD is an active-high, input signal used by the DMA (Direct Memory
Access) Controller to transfer the data.
• When a Peripheral Device wants to transfer the data, it requests DMA
controller.
• Here, in response with it , the DMA Controller ask for Buses to the 8085
Microprocessor by making it’s HOLD output High which is connected to
the Input of HOLD of Microprocessor.
HLDA(Pin No. 39)
• Whenever the Microprocessor receives that high-output signal from
HOLD’s input, then it sends this high-output signal to HLDA to hold the
acknowledgement that the HOLD-Request has been received by the
DMA Controller by indicating that it has turned the control over buses for
other master in the system.
• When data-transfer is completed, then it returns the control of buses
back to the 8085 Microprocessor by sending back a low HOLD Signal.
Pin Diagram of 8085 Microprcoessor
Vcc (Pin No. 40) & Vss(Pin No.20)
• VCC (Voltage Common Collector) is the higher voltage with
respect to GND (ground).
• VCC is the power input of a device. It may be positive or
negative with respect to GND.
• When the only positive power supply is used then VSS
(Voltage Source Supply) means ground or zero.
• The Intel 8085 Microprocessor needs a power supply of +5
V DC for its working.
• Pin 40 of Intel 8085 is the Vcc pin. It should be connected to
+5 V DC power supply.
• Pin 20 of 8085 is the Vss pin.
Functional Block Diagram of 8085
Instruction register and decoder
• Instruction register is an 8-bit register. When an
instruction is fetched from memory then it is stored in
the Instruction register. It always stores the first
byte(opcode) of the instruction.

• Instruction decoder decodes the information present


in the Instruction register. The output of the decoder,
gated by timing signals, controls the register, ALU and
data/address buffers. The output of decoder and
internal clock generator produce the state and machine
cycle timing signals
Functional Block Diagram of Generic Microprocessor
Board Questions
Q.1 Draw a functional pin diagram of microprocessor. Explain the purpose of each pin of
8085 microprocessor.

Q.2 Explain multiplexed address/data bus in 8085 microprocessor and how address and
data is demultiplexed.

Q.3 What are I/O mapped I/O and memory mapped I/O schemes? Which one 8085 uses.

Q.4 Define the following terms with suitable diagram:


(a) Instruction Cycle (b) Machine Cycle (c) T-State

Q.5 Explain the following terms:


(a) Instruction Register (b) Instruction Decoder (c) Serial I/O control

Q.6 Draw a labeled block diagram of microprocessor 8085.

Q.7 Give the features of microprocessor 8085.


Thank You

You might also like