Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

Memory and input/output addressing of 8085 microprocessors.

Parmod Kumar

Section. F4901

Roll.No. RF4901B44 s
Regd.No.10900960

Class.B.Tech(ME)

ACKNOWLEDGEMENT
Affordable 8-bit microprocessors with 16-bit addressing
I take this opportunity to present my votes of thanks to also led to the first general purpose microcomputers from
all those guidepost who really acted as lightening
pillars to enlighten our way throughout this project the mid-1970s on.
that has led to successful and satisfactory completion
of this study. During the 1960s, computer processors were often

constructed out of small and medium-scale ICs containing


We are really grateful to our HOD for providing us
with an opportunity to undertake this project in this from tens to a few hundred transistors. The integration of a
university and providing us with all the facilities. We
whole CPU onto a single chip greatly reduced the cost of
are highly thankful to our subject teacher Miss. Lipsa
Das for her active support, valuable time and advice, processing power. From these humble beginnings,
whole-hearted guidance, sincere cooperation and
continued increases in microprocessor capacity have
pains-taking involvement during the study and in
completing the assignment of preparing the said rendered other forms of computers almost completely
project within the time stipulated.
obsolete, with one or more microprocessors used in
Lastly, We are thankful to all those, particularly the everything from the smallest embedded
various friends , who have been instrumental in
creating proper, healthy and conductive environment systems and handheld devices to the largest
and including new and fresh innovative ideas for us mainframes and supercomputers.
during the project, their help, it would have been
extremely difficult for us to prepare the project in a Since the early 1970s, the increase in capacity of
time bound framework.
microprocessors has been a consequence of Moore's Law,

Microprocessor which suggests that the number of transistors that can be

fitted onto a chip doubles every two years. Although


A microprocessor incorporates most or all of the functions
originally calculated as a doubling every year, Moore later
of a computer's central processing unit (CPU) on a
refined the period to two years.
single integrated circuit (IC, or microchip). The first

microprocessors emerged in the early 1970s and were used In the late 1990s, and in the high-performance

for electronic calculators, using binary-coded microprocessor segment, heat generation (TDP), due to

decimal (BCD) arithmetic on 4-bit words. switching losses, static current leakage, and other factors,

Other embedded uses of 4-bit and 8-bit microprocessors, emerged as a leading developmental constraint.

such as terminals, printers, various kinds of automation etc.


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


8085 Microprocessor Arithmetic and Logic unit.

The accumulator is also called an 8-bit register. The


The Intel 8085 is an 8-bit microprocessor introduced accumulator is connected to Internal Data bus and ALU
(arithmetic and logic unit). The accumulator can be used to
by Intel in 1977. It was binary-compatible with the more-
send or receive data from the Internal Data bus.
famous Intel 8080 but required less supporting hardware,
Arithmetic and Logic Unit
thus allowing simpler and less

expensive microcomputer systems to be built. There is always a need to perform arithmetic operations
like +, -, *, / and to perform logical operations like AND,
The "5" in the model number came from the fact that the OR, NOT etc. So there is a necessity for creating a separate
unit which can perform such types of operations. These
8085 required only a +5-volt (V) power supply rather than operations are performed by the Arithmetic and Logic Unit
(ALU). ALU performs these operations on 8-bit data.
the +5V, -5V and +12V supplies the 8080 needed. The

8085 had a long life as a controller. 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
Internal Architecture of 8085 Microprocessor:- 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.

Accumulator

Accumulator is nothing but a register which can hold 8-bit


data. Accumulator aids in storing two quantities.
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.

8085 Architecture Pin Diagram

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.
Address Bus:
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). The pins A8-A15 denote the address bus. They are used for
the most significant bit of memory address.
So does that mean the stack pointer points to portion of
RAM? Address/Data Bus:

Yes. Stack pointer maintains the address of the last byte AD0-AD7 constitutes the Address/Data bus. They are time
that is entered into stack. multiplexed. These pins are used for least significant bits of
address bus in the first machine clock cycle and used as
data bus for second and third clock cycle.
Each time when the data is loaded into stack, Stack pointer
gets decremented. Conversely it is incremented when data
is retrieved from stack. But what is a clock cycle? What is first clock cycle and
second, third so on...
A clock cycle is nothing but the time taken between two READY is used by the microprocessor to check whether a
adjacent pulses of the oscillator. In simple words clock peripheral is ready to accept or transfer data. A peripheral
cycle refers to the transition between o volts to 5 volts and may be a LCD display or analog to digital converter or any
back to 0 volts. So the first clock cycle means the first other. These peripherals are connected to microprocessor
transition of pulse from 0volts to 5 volts and then back to 0 using the READY pin. If READY is high then the
volts. periphery is ready for data transfer. If not the
microprocessor waits until READY goes high.
ALE: Address Latch Enable:
HOLD:
In the previous article we saw how ALE helps in
demultiplexing the lower order address and data bus. This This indicates if any other device is requesting the use of
signal goes high during the first clock cycle and enables the address and data bus. Consider two peripheral devices. One
lower order address bits. The lower order address bus is is the LCD and the other Analog to Digital converter.
added to memory or any external latch. Suppose if analog to digital converter is using the address
and data bus and if LCD requests the use of address and
IO/M’: data bus by giving HOLD signal, then the microprocessor
transfers the control to the LCD as soon as the current cycle
is over. After the LCD process is over, the control is
Consider we have an address to be processed. But how do transferred back to analog and digital converter.
the processors know whether the address is for memory or
I/O functions? For this purpose a status signal called IO/M’
is used. This distinguishes whether the address is for HLDA:
memory or IO. When this pin goes high, the address is for
an I/O device. While the pin goes low, the address is HLDA is the acknowledgment signal for HOLD. It
assigned for the memory. indicates whether the HOLD signal is received or not. After
the execution of HOLD request, HLDA goes low.
S0-S1:
INTR:
S0 and S1 are status signals which provides different status
and functions depending on their status. INTR is an interrupt request signal. It has the lowest
priority among the interrupts. INTR can be enabled or
disabled by using software. Whenever INTR goes high the
microprocessor completes the current instruction which is
being executed and then acknowledges the INTR signal and
processes it.

INTA’:

Whenever the microprocessor receives interrupt signal. It


has to be acknowledged. This acknowledgement is done by
INTA’. So whenever the interrupt is received INTA’ goes
high.

RD’:
RST 5.5, 6.5, 7.5:

This is an active low signal. That is, an operation is


These are nothing but the restart interrupts. They insert an
performed when the signal goes low. This signal is used to
internal restart function automatically.
control READ operation of the microprocessor. When this
pin goes low the microprocessor reads the data from
memory or I/O device. All the above mentioned interrupts are maskable interrupts.
That is, they can be enabled or disabled using programs.
WR’:
TRAP:
WR’ is also an active low signal which controls the write
operations of the microprocessor. When this pin goes low, Among the interrupts of 8085 microprocessor, TRAP is the
the data is written to the memory or I/O device. only non-maskable interrupt. It cannot be enabled or
disabled using a program. It has the highest priority among
the interrupts.
READY:
PRIORITY ORDER (From highest to lowest) SOD:

TRAP This pin provides the serial output data. The serial data on
this pin delivers its output to the seventh bit of the
RST 7.5 accumulator when SIM instruction is executed.

RST 6.5 Vcc and Vss:

RST 5.5 Vcc is +5v pin and Vss is ground pin.

INTR Thus the pin diagram and signals of 8085 microprocessor


are explained in detail.

Memory:-
RESET IN’:
Program, data and stack memories occupy the same
This pin resets the program counter to 0 and resets interrupt memory space. The total addressable memory size is 64 kb.
enable and HLDA flip-flops. The CPU is held in reset
Program memory:- Program can be located anywhere in
condition until this pin is high. However the flags and
registers won’t get affected except for instruction register. memory. Jump, branch and call instructions use 16-bit
addresses, ie. they can be used to jump/branch anywhere
RESET OUT: within 64 KB. All jump/branch instructions use absolute
addressing.
This pin indicates that the CPU has been reset by RESET
IN’. Data memory:- The processor always uses 16-bit
addresses so that data can be placed anywhere.
X1 X2:
Input/output scheme:-
These are the terminals which are connected to external
oscillator to produce the necessary and suitable clock The 8085 supported up to 256 input/output (I/O) ports,
operation. accessed via dedicated I/O instructions—taking port

CLK: addresses as operands. This I/O mapping scheme was

regarded as an advantage, as it freed up the processor's


Sometimes it is necessary for generating clock outputs
from microprocessors so that they can be used for other limited address space. Many CPU architectures instead use
peripherals or other digital IC’s. This is provided by CLK
pin. Its frequency is always same as the frequency at which a common address space without the need for dedicated I/O
the microprocessor operates. instructions, although a drawback in such designs may be

SID: that special hardware must be used to insert wait states as

peripherals are often slower than memory. However, in


This pin provides serial input data. The serial data on this
pin is loaded into the seventh bit of the accumulator when some simple 8080 computers, I/O was indeed addressed as
RIM instruction is executed.
if they were memory cells, "memory mapped", leaving the
RIM stands for READ INTERRUPT MASK, which checks I/O commands unused. I/O addressing could also
whether the interrupt is masked or not.
sometimes employ the fact that the processor would output

the same 8-bit port address to both the lower and the higher

address byte (i.e. IN 05h would put the address 0505h on

the 16-bit address bus). Similar I/O-port schemes are used


Instruction Set Classification
in the 8080-compatible Zilog Z80 as well as the closely
An instruction is a binary pattern designed inside a
related x86 families of microprocessors. microprocessor to perform a specific function. The entire

The 8085 Addressing Modes:- group of instructions, called the instruction set, determines

The instructions MOV B, A or MVIA, 82H are to copy what functions the microprocessor can perform. These

data from a source into adestination. In these instructions instructions can be classified into the following five

the source can be a register, an input port, or an 8- functional categories: data transfer (copy) operations,

bitnumber (00H to FFH). Similarly, a destination can be a arithmetic operations, logical operations, branching

register or an output port. Thesources and destination are operations, and machine-control operations.

operands. The various formats for specifying operands


arecalled the ADDRESSING MODES. For 8085, they are: Data Transfer Operations

1. Immediate addressing. This group of instructions copy data from a location called

2. Register addressing. a source to another location called a destination, without

3. Direct addressing. modifying the contents of the source. In technical manuals,

4. Indirect addressing. the term data transfer is used for this copying function.
However, the term transfer is misleading; it creates the
Immediate addressing:-
impression that the contents of the source are destroyed
Data is present in the instruction. Load the immediate data
when, in fact, the contents are retained without any
to the destination provided. modification.
Arithmetic Operations
Example: MVI R,data
These instructions perform arithmetic operations such as
Register addressing addition, subtraction, increment, and decrement.
Addition - Any 8-bit number, or the contents of a register
Data is provided through the registers. or the contents of a memory location can be added to the
contents of the accumulator and the sum is stored in the
Example: MOV Rd, Rs accumulator. No two other 8-bit registers can be added
directly (e.g., the contents of register B cannot be added
Direct addressing:-
directly to the contents of the register C). The instruction
Used to accept data from outside devices to store in the DAD is an exception; it adds 16-bit data directly in register
accumulator or send the data stored in the accumulator to pairs.
Subtraction - Any 8-bit number, or the contents of a
the outside device. Accept the data from the port 00H and register, or the contents of a memory location can be
store them into the accumulator or Send the data from the subtracted from the contents of the accumulator and the
results stored in the accumulator. The subtraction is
accumulator to the port 01H. performed in 2's compliment, and the results if negative,
are expressed in 2's complement. No two other registers
Example: IN 00H or OUT 01
can be subtracted directly.
Indirect Addressing:- Increment/Decrement - The 8-bit contents of a register or
a memory location can be incremented or decrement by 1.
This means that the Effective Address is calculated by the Similarly, the 16-bit contents of a register pair (such as BC)
processor. And the contents of the address (and the one can be incremented or decrement by 1. These increment
and decrement operations differ from addition and
following) is used to form a second address. The second subtraction in an important way i.e., they can be performed
address is where the data is stored. Note that this requires in any one of the registers or in a memory location.
Logical Operations
several memory accesses; two accesses to retrieve the 16-
These instructions perform various logical operations with
bit address and a further access (or accesses)to retrieve the the contents of the accumulator.
AND, OR Exclusive-OR -A memory location can be
data which is to be loaded into the register
logically AND Or, or Exclusive-OR with the contents of
the accumulator. The results are stored in the accumulator.
Rotate-Each bit in the accumulator can be shifted either
left or right to the next position.
Compare- Any 8-bitnumber, or the contents of a register,
or a memory location can be compared for equality, greater
than, or less than, with the contents of the accumulator.
Complement - The contents of the accumulator can be
complemented. All 0s are replaced by 1s and all 1s are
replaced by 0s.
Branching Operations
This group of instructions alters the sequence of program
execution either conditionally or unconditionally.
Jump -Conditional jumps are an important aspect of the
decision-making process in the programming. These
instructions test for a certain conditions (e.g., Zero or Carry
flag) and alter the program sequence when the condition is
met. In addition, the instruction set includes an instruction
called unconditional jump.
Call, Return, and Restart - These instructions change the
sequence of a program either by calling a subroutine or
returning from a subroutine. The conditional Call and
Return instructions also can test condition flags.
.

Reference
http://www.brighthub.com/engineering/electrical/articles/5
2160.aspx

http://www.cpu-world.com/Arch/8085.html

http://www.scribd.com/doc/4616314/8085-Microprocessor

http://www.indiastudychannel.com/resources/8209-
Introduction-to-Intel.aspx

You might also like