Memory and Input/output Addressing of 8085 Microprocessors.: Parmod Kumar
Memory and Input/output Addressing of 8085 Microprocessors.: Parmod Kumar
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
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.
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.
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.
Accumulator
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’:
RD’:
RST 5.5, 6.5, 7.5:
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.
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
the same 8-bit port address to both the lower and the higher
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.
1. Immediate addressing. This group of instructions copy data from a location called
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