0% found this document useful (0 votes)
1 views10 pages

Introduction To Microprocessor - 8085 Microprocessor

A microcomputer is a compact, affordable computer for individual use, utilizing a microprocessor as its CPU, and is essential for personal computing. Microprocessors are integrated circuits that execute instructions for arithmetic and logic operations, while microcontrollers are specialized microprocessors designed for specific tasks in embedded systems. The Intel 8085 microprocessor, introduced in 1977, is an 8-bit processor with a 16-bit address bus, capable of addressing 64KB of memory, and includes various internal units such as the Arithmetic Logic Unit and program counter.

Uploaded by

Suman
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views10 pages

Introduction To Microprocessor - 8085 Microprocessor

A microcomputer is a compact, affordable computer for individual use, utilizing a microprocessor as its CPU, and is essential for personal computing. Microprocessors are integrated circuits that execute instructions for arithmetic and logic operations, while microcontrollers are specialized microprocessors designed for specific tasks in embedded systems. The Intel 8085 microprocessor, introduced in 1977, is an 8-bit processor with a 16-bit address bus, capable of addressing 64KB of memory, and includes various internal units such as the Arithmetic Logic Unit and program counter.

Uploaded by

Suman
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Microcomputer

A microcomputer is a small, relatively inexpensive computer designed for individual use,


featuring a microprocessor as its Central Processing Unit (CPU). It incorporates memory,
input/output (I/O) circuitry, and a processor on a single printed circuit board. Common
examples include laptops, desktops, tablets, and smartphones, making them essential for
personal computing.
Microprocessor
A microprocessor is a computer processor that incorporates the functions of a central
processing unit (CPU) on a single integrated circuit (IC). As the "brain" of digital devices, it
fetches, decodes, and executes instructions to perform arithmetic and logic operations. It drives
computers, smartphones, and embedded systems.
The word ‘microprocessor’ comes from the combination micro and processor.
• Processor
Processor means a device that processes whatever. In this context processor means a device
that processes numbers, specifically binary numbers, 0’s and 1’s.
Micro is a new addition.
In the late 1960’s, processors were built using discrete elements.
These devices performed the required operation, but were too large and too slow.
In the early 1970’s the microchip was invented.
All of the components that made up the processor were now placed on a single piece of
silicon.
The size became several thousand times smaller and the speed became several hundred
times faster. The “Micro” Processor was born.
Microcontroller
A microcontroller (MCU) is a compact, self-contained computer on a single integrated circuit
(IC) designed to govern specific operations in embedded systems. It combines a processor
(CPU), memory (RAM/ROM), and programmable input/output (I/O) peripherals to control
devices like appliances, automobiles, and sensors.
What is microprocessor?
The microprocessor is a programmable device that takes in numbers, performs on them
arithmetic or logical operations the program produces stored in memory according to and
then other numbers as a result.
• Programmable device: The microprocessor can perform different sets of operations on
the data it receives depending on the sequence of instructions supplied in the given
program. By changing the program, the microprocessor manipulates the data in
different ways.
• Instructions: Each microprocessor is designed to execute a specific group of
operations. This group of operations is called an instruction set. This instruction set
defines what the microprocessor can and cannot do.
It consists of three main parts which are described as follows:
o Arithmetic Logic Unit (ALU): It is an electronic circuit that performs arithmetic
and logical operations on data received from an input device or memory.
o Control Unit (CU): This electronic circuit of the microprocessor is responsible
controlling the flow of data and instructions within the device or the system.
o Register Array: Register array is nothing but a collection of digital registers to
provide small and fast storage to temporarily hold data and instructions in the
microprocessor during processes.
Fig. Block diagram of Microprocessor

• Numbers: The microprocessor has a very narrow view on life. It only understands
binary numbers.
➢ A binary digit is called a bit (which comes from binary digit).
➢ The microprocessor recognizes and processes a group of bits together.
➢ This group of bits is called a “word”.
➢ The number of bits in a Microprocessor’s word, is a measure of its “abilities”.
• Arithmetic and Logic Operations:
➢ Every microprocessor has arithmetic operations such as add and subtract as part
of its instruction set.
➢ Most microprocessors will have operations such as multiply and divide.
➢ Some of the newer ones will have complex operations such as square root.
➢ In addition, microprocessors have logic operations as well. Such as AND, OR,
XOR, shift left, shift right, etc.
➢ Again, the number and types of operations define the microprocessor’s
instruction set and depends on the specific microprocessor.
• Memory:
➢ Memory is the location where information is kept while not in current use.
➢ Memory is a collection of storage devices. Usually, each storage device holds
one bit. Also, in most kinds of memory, these storage devices are grouped into
groups of 8. These 8 storage locations can only be accessed together. So, one can
only read or write in terms of bytes to and from memory.
➢ Memory is usually measured by the number of bytes it can hold. It is measured
in Kilos, Megas and lately Gigas. A Kilo in computer language is 210 =1024. So,
a KB (KiloByte) is 1024 bytes. Mega is 1024 Kilos and Giga is 1024 Mega.
➢ When a program is entered into a computer, it is stored in memory. Then as the
microprocessor starts to execute the instructions, it brings the instructions from
memory one at a time.
➢ Memory is also used to hold the data.
➢ The microprocessor reads (brings in) the data from memory when it needs it and
writes (stores) the results into memory when it is done.
8085 Microprocessor
The Intel 8085 is an 8-bit microprocessor introduced by Intel in 1977. It was binary compatible
with the more-famous Intel 8080 but required less supporting hardware, thus allowing simpler
and less expensive microcomputer systems to be built. The "5" in the model number came from
the fact that the 8085 requires only a +5-Volt (V) power supply rather than the +5 V, −5 V and
+12 V supplies the 8080 needed.
The main features of 8085 microprocessor are:
• It is an 8-bit microprocessor.
• It is manufactured with N-MOS technology.
• It has 16-bit address bus and hence can address up to 216= 65536 bytes (64KB) memory
locations through A0–A15.
• The first 8 lines of address bus and 8 lines of data bus are multiplexed AD0–AD7
• Data bus is a group of 8 lines D0–D7.
• It supports external interrupt request.
• A 16-bit program counter (PC)
• A 16-bit stack pointer (SP)
• Six 8-bit general purpose register arranged in pairs: BC, DE, HL.
• It requires a signal +5V power supply and operates at 3.2 MHZ single phase clock.
• It is enclosed with 40 pins DIP (Dual in line package).

Architecture of 8085 Microprocessor

8085 consists of various units as shown in Fig. 1 and each unit performs its own functions. The
various units of a microprocessor are listed below:
• Accumulator
• Arithmetic and logic Unit
• General purpose register
• Program counter
• Stack pointer
• Temporary register
• Flags
• Instruction register and Decoder
• Timing and Control unit
• Interrupt control
• Address buffer and Address-Data buffer
• Address bus and Data bus

Accumulator
Accumulator is nothing but a register which can hold 8-bit data. Accumulator aids in storing
two quantities. The data to be processed by arithmetic and logic unit is stored in accumulator.
It also stores the result of the operation carried out by the Arithmetic and Logic unit. The
accumulator is also called an 8-bit register. The accumulator is connected to Internal Data bus
and ALU (arithmetic and logic unit). The accumulator can be used to send or receive data from
the Internal Data bus.

Arithmetic and Logic Unit


There is always a need to perform arithmetic operations like +, -, *, / and to perform logical
operations like AND, OR, NOT etc. So, there is a necessity for creating a separate unit which
can perform such types of operations. These operations are performed by the Arithmetic and
Logic Unit (ALU). ALU performs these operations on 8-bit data. But these operations cannot
be performed unless we have an input (or) data on which the desired operation is to be
performed. So, from where do these inputs reach the ALU? For this purpose, accumulator is
used. ALU gets its Input from accumulator and temporary register. After processing the
necessary operations, the result is stored back in accumulator.

General Purpose Registers


Apart from accumulator 8085 consists of six special types of registers called General Purpose
Registers. These general-purpose registers are used to hold data like any other registers. The
general-purpose registers in 8085 processors are B, C, D, E, H and L. Each register can hold
8-bit data. Apart from the above function these registers can also be used to work in pairs to
hold 16-bit data. They can work in pairs such as B-C, D-E and H-L to store 16-bit data. The H-
L pair works as a memory pointer. A memory pointer holds the address of a particular memory
location. They can store 16-bit address as they work in pair.

Program Counter and Stack Pointer


Program counter is a special purpose register. Consider that an instruction is being executed by
processor. As soon as the ALU finished executing the instruction, the processor looks for the
next instruction to be executed. So, there is a necessity for holding the address of the next
instruction to be executed in order to save time. This is taken care by the program counter. A
program counter stores the address of the next instruction to be executed. In other words, the
program counter keeps track of the memory address of the instructions that are being executed
by the microprocessor and the memory address of the next instruction that is going 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. Program counter is a 16-bit register. Stack pointer is also a 16-bit register which is
used as a memory pointer. A stack is nothing but the portion of RAM (Random access
memory).

Temporary Register
As the name suggests this register acts as a temporary memory during the arithmetic and logical
operations. Unlike other registers, this temporary register can only be accessed by the
microprocessor and it is completely inaccessible to programmers. Temporary register is an 8-
bit register.

Flags
Flags are nothing but a group of individual Flip-flops. The flags are mainly associated with
arithmetic and logic operations. The flags will show either a logical (0 or 1) (i.e.) a set or reset
depending on the data conditions in accumulator or various other registers. A flag is actually a
latch which can hold some bits of information. It alerts the processor that some event has taken
place.
Fig. Flag Register

Intel processors have a set of 5 flags.


1. Carry flag
2. Parity flag
3. Auxiliary carry flag
4. Zero flag
5. Sign flag
Carry flag and Auxiliary carry flag: This sets the auxiliary carry flag. When there is no carry,
the auxiliary carry flag is reset. So, whenever there is a carry in the most significant bit Carry
flag is set. While an auxiliary carry flag is set only when a carry is generated in bits other than
the most significant bit.
Parity flag: Parity checks whether it’s even or add parity. This flag returns a 0 if it is odd parity
and returns a 1 if it is an even parity. Sometimes they are also called as parity bit which is used
to check merrors while data transmission is carried out.
Zero flag: Zero flag shows whether the output of the operation is 0 or not. If the value of Zero
flag is 0 then the result of operation is not zero. If it is zero the flag returns value 1.
Sign flag: Sign flag shows whether the output of operation has positive sign or negative sign.
A value 0 is returned for positive sign and 1 is returned for negative sign.
Instruction Register and Decoder
Instruction register is 8-bit register just like every other register of microprocessor. Consider
an instruction. The instruction may be anything like adding two data's, moving a data, copying
a data etc. When such an instruction is fetched from memory, it is directed to Instruction
register. So, the instruction registers are specifically to store the instructions that are fetched
from memory. There is an Instruction decoder which decodes the information present in the
Instruction register for further processing.
Timing and Control Unit
Timing and control unit is a very important unit as it synchronizes the registers and flow of
data through various registers and other units. This unit consists of an oscillator and controller
sequencer which sends control signals needed for internal and external control of data and other
units. The oscillator generates two-phase clock signals which aids in synchronizing all the
registers of 8085 microprocessor.
Signals that are associated with Timing and control unit are:
Control Signals: RD’, WR’, ALE
• ALE is used for provide control signal to synchronize the components of
microprocessor and timing for instruction to perform the operation.
• RD (Active low) and WR (Active low) are used to indicate whether the operation is
reading the data from memory or writing the data into memory respectively.
Status Signals: S0, S1, IO/M’
• IO/M (Active low) is used to indicate whether the operation belongs to the memory or
peripherals.

Table: Status signals and the status of data bus

IO/M’ (Active Low) S1 S2 Data Bus Status (Output)


0 0 0 Halt
0 0 1 Memory WRITE
0 1 0 Memory READ
1 0 1 IO WRITE
1 1 0 IO READ
0 1 1 Op code fetch
1 1 1 Interrupt acknowledge

DMA Signals: HOLD, HLDA, READY


• HOLD: Indicates that another master is requesting the use of the address and data buses.
The CPU, upon receiving the hold request, will relinquish the use of the bus as soon as
the completion of the current bus transfer. Internal processing can continue. The
processor can regain the bus only after the HOLD is removed. When the HOLD is
acknowledged, the Address, Data RD, WR and IO/M’ lines are tri-stated.
• HLDA: 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. The CPU takes the bus one half-clock cycle after HLDA goes low.
• READY: This signal synchronizes the fast CPU and the slow memory, peripherals. If
READY is high during a read or write cycle, it indicates that the memory or peripheral
is ready to send or receive data. If READY is low, the CPU will wait an integral number
of clock cycle for READY to go high before completing the read or write cycle.
READY must conform to specified setup and hold times.
Reset Signals: Reset in, Reset Out
RESET IN: A low on this pin;
• Sets the program counter to zero (0000H)
• Resets the interrupt enables and HLDA flip-flops.
• Tri-states the data bus, address bus and control bus.
• Affects the content of processors internal registers randomly.
On Reset, The Program counter sets to 0000h which causes the 8085 to execute; the first
instruction from address 0000H.
RESET OUT: This active high signal indicates that the processor; is being reset. This signal is
synchronized to the processor clock and it can be used to reset other devices connected in the
system.
Interrupt control
As the name suggests this control interrupts a process. Consider that a microprocessor is
executing the main program. Now whenever the interrupt signal is enabled or requested the
microprocessor shifts the control from main program to process the incoming request and after
the completion of request, the control goes back to the main program. For example, an
Input/output device may send an interrupt signal to notify that the data is ready for input. The
microprocessor temporarily stops the execution of main program and transfers control to I/O
device. After collecting the input data, the control is transferred back to main program. Interrupt
signals present in 8085 are:
• INTR
• RST 7.5
• RST 6.5
• RST 5.5
• TRAP
➢ INTR is maskable 8080A compatible interrupt. When the interrupt occurs the processor
fetches from the bus one instruction, usually one of these instructions: One of the 8 RST
instructions (RST0 - RST7). The processor saves current program counter into stack
and branches to memory location N * 8 (where N is a 3 - bit number from 0 to 7 supplied
with the RST instruction).
➢ CALL instruction (3-byte instruction). The processor calls the subroutine, address of
which is specified in the second and third bytes of the instruction.
✓ RST5.5 is a maskable interrupt. When this interrupt is received the processor saves the
contents of the PC register into stack and branches to 2CH (hexadecimal) address.
✓ RST6.5 is a maskable interrupt. When this interrupt is received the processor saves the
contents of the PC register into stack and branches to 34H (hexadecimal) address.
✓ RST7.5 is a maskable interrupt. When this interrupt is received the processor saves the
contents of the PC register into stack and branches to 3CH (hexadecimal) address.
✓ TRAP is a non-maskable interrupt. When this interrupt is received the processor saves
the contents of the PC register into stack and branches to 24H (hexadecimal) address.
✓ All maskable interrupts can be enabled or disabled using EI and DI instructions.
RST5.5, RST6.5 and RST7.5 interrupts can be enabled or disabled individually using
SIM instruction.
Serial Input/output control
The input and output of serial data can be carried out using 2 instructions in 8085.
• SID-Serial Input Data
• SOD-Serial Output Data
Two more instructions are used to perform serial-parallel conversion needed for serial I/O
devices.
• SIM
• RIM
Address buffer and Address-Data buffer
The contents of the stack pointer and program counter are loaded into the address buffer and
address-data buffer. These buffers are then used to drive the external address bus and address-
data bus. As the memory and I/O chips are connected to these buses, the CPU can exchange
desired data to the memory and I/O chips.
The address-data buffer is not only connected to the external data bus but also to the internal
data bus which consists of 8-bits. The address data buffer can both send and receive data from
internal data bus.
Address bus and Data bus
We know that 8085 is an 8-bit microprocessor. So, the data bus present in the microprocessor
is also 8-bits wide. So, 8-bits of data can be transmitted from or to the microprocessor. But
8085 processor requires 16-bit address bus as the memory addresses are 16-bit wide. The 8
most significant bits of the address are transmitted with the help of address bus and the 8 least
significant bits are transmitted with the help of multiplexed address/data bus. The eight- bit
data bus is multiplexed with the eight least significant bits of address bus. The address/data bus
is time multiplexed. This means for few microseconds, the 8 least significant bits of address
are generated, while for next few seconds the same pin generates the data. This is called Time
multiplexing. But there are situations where there is a need to transmit both data and address
simultaneously. For this purpose, a signal called ALE (address latch enables) is used. ALE
signal holds the obtained address in its latch for a long time until the data is obtained and so
when the microprocessor sends the data next time the address is also available at the output
latch. This technique is called Address/Data demultiplexing.
Pin Diagram of 8085
The signals can be grouped as follows
1. Power supply and clock signals
2. Address bus
3. Data bus
4. Control and status signals
5. Interrupts and externally initiated signals
6. Serial I/O ports

Power supply and Clock frequency signals


• Vcc + 5-volt power supply
• Vss Ground
• X1, X2: Crystal or R/C network or LC network connections to set the frequency
of internal clock generator. The frequency is internally divided by two. Since
the basic operating timing frequency is 3 MHz, a 6 MHz crystal is connected
externally.
• CLK (output) – Clock Output is used as the system clock for peripheral and
devices interfaced with the microprocessor.
Pin diagram of 8085 microprocessor

Pin 1: X1 Pin 21: VCC

Pin 2: X2 Pin 22: HOLD

Pin 3: RESET OUT Pin 23: HLDA

Pin 4: SOD Pin 24: CLK(OUT)

Pin 5: SID Pin 25: RESET IN’

Pin 6: TRAP Pin 26: READY

Pin 7: RST7.5 Pin 27: IO/M’

Pin 8: RST6.5 Pin 28: S1

Pin 9: RST5.5 Pin 29: RD’

Pin 10: INTR Pin 30: WR’

Pin 11: INTA’ Pin 31: ALE

Pin 12: AD0 Pin 32: S0


Pin 13: AD1 Pin 33: A15

Pin 14: AD2 Pin 34: A14

Pin 15: AD3 Pin 35: A13

Pin 16: AD4 Pin 36: A12

Pin 17: AD5 Pin 37: A11

Pin 18: AD6 Pin 38: A10

Pin 19: AD7 Pin 39: A9

Pin 20: VSS Pin 40: A8

Data Bus and Address Bus


AD0-AD7:-These are multiplexed address and data bus. So, it can be used to carry the lower
order 8-bit address as well as the data. Generally, these lines are demultiplexed using the Latch.
During the opcode fetch operation, in the first clock cycle the lines deliver the lower order
address bus A0-A7. In the subsequent IO/M read or write it is used as data bus D0-D7. CPU
can read or write data through these lines. A8-A15:- These are address bus used to address the
memory location.

Instruction Set

The 8085 instruction set can be classified into the following five functional headings.

Data Transfer Instructions: Includes the instructions that moves (copies) data between
registers or between memory locations and registers. In all data transfer operations, the content
of source register is not altered. Hence the data transfer is copying operation.
Arithmetic Instructions: Includes the instructions, which performs the addition, subtraction,
increment or decrement operations. The flag conditions are altered after execution of an
instruction in this group.

Logical Instructions: The instructions which performs the logical operations like AND, OR,
EXCLUSIVE-OR, complement, compare and rotate instructions are grouped under this
heading. The flag conditions are altered after execution of an instruction in this group.

Branching Instructions: The instructions that are used to transfer the program control from
one memory location to another memory location are grouped under this heading.

Control Instructions: Includes the instructions related to interrupts and the instruction used to
halt program execution.

You might also like