Vous êtes sur la page 1sur 5

EXPERIMENT NO: 1

OBJECTIVE: To Study about the Bus Organization and Programmable Model of


Microprocessor 8085.
THEORY:
The microprocessor [MPU] is a programmable digital device, designed with registers, flip-
flops and timing elements. The microprocessor has a set of instructions, designed internally,
to manipulate data and communicate with peripherals. This process of data manipulation and
communication is determined by the logic design of the microprocessor, called architecture.
The microprocessor can be programmed to perform functions on given data by selecting
necessary instructions from its set. These instructions are given to the microprocessor by
writing them into its memory. Writing instructions and data is done through input device such
as keyboard.
The functions performed by microprocessor can be classified into following categories:
1) Microprocessor – initiated operations.
2) Internal operations.
3) Peripheral (or eternally initiated) operations.
Microprocessor – Initiated operations and 8085 Bus organization:
The MPU performs primarily four operations:
1. Memory Read: Reads data (or instructions) from memory.
2. Memory Write: Writes data (or instructions) into memory.
3. I/O Read: Accepts data from input devices.
4. I/O Write: Sends data to output devices.

All these operations are part of communication process between the MPU and peripheral
devices. To communicate with peripheral (or memory location), the MPU needs to perform
the following steps:

Step 1: Identify the peripheral or the memory location (with its address)
Step 2: Transfer binary information (data and instruction)
Step 3: Provide timing or synchronization signals.

The 8085 MPU performs these functions using three sets of communication lines called
buses:
a) Address bus
b) Data bus
c) Control bus
Figure shows the 8085 Bus Structure

Address Bus:
• The address bus is a group of 16-lines generally identified as A0 to A15.
• The address bus is unidirectional: bits flow in one direction-from the MPU to
peripheral devices.
• The MPU uses address bus to perform the first function: identifying a peripheral or a
memory location.
• In a computer system, a binary number called an address identifies each peripheral or
memory location, and the address bus is used to carry a 16-bit address.
• The number of address lines of the MPU determines its capacity to identify different
memory locations (on peripherals).
• The 8085 MPU with 16 address lines capable of addressing 65536 (generally known
as 64K) memory locations.
• E.g. Intel 8088 processor has 20 address lines and Pentium processor has 32 address
lines.

Data Bus:
• The data bus is a group of 8 lines used for data flow (the term data refers to any
binary information that may include an instruction, an address or a number).
• These lines are bi-directional- data flow in both directions between MPU and memory
and peripheral devices.
• The MPU uses data bus to perform second function: transferring binary information.
• To eight data lines enable the MPU to manipulate 8-bit data ranging from 00 to FF.
• The largest number that can appear on the data bus is 1111 1111. The 8085 is known
as an 8-bit microprocessor.
• Microprocessors such as Intel 8086, Zilog Z8000 and Motorola 68000 have 16 data
lines; thus they are known as 16-bit microprocessor.
• Intel 80386/486/586 are 32-bit microprocessor.

Control Bus:
• The control bus is the various signal lines that carry synchronization signals.
• The MPU generates specific control signals for every operation (such as Memory
Read or I/O Write) it performs.
• The MPU places the 16-bit address on the address bus.
• The address on the bus is decoded by an external logic circuit.
• The MPU sends a pulse called Memory Read as the control signal.
The pulse activates the memory chip, and the contents of the memory location are placed on
the data bus and brought inside the microprocessor.

8085 Programmable Model:


The 8085/8080A-programming model includes six registers, one accumulator, and one flag
register, as shown in Figure. In addition, it has two 16-bit registers: the stack pointer and the
program counter. They are described briefly as follows. The 8085/8080A has six general-
purpose registers to store 8-bit data; these are identified as B, C, D, E, H, and L as shown in
the figure. 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.
Figure shows a hardware model and a programming model specific to the 8085
microprocessor.

Accumulator
The accumulator is an 8-bit register that is a part of arithmetic/logic unit (ALU). This
register is used to store 8-bit data and to perform arithmetic and logical operations. The result
of an operation is stored in the accumulator. The accumulator is also identified as register A.
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. They are called Zero (Z),
Carry (CY), Sign (S), Parity (P), and Auxiliary Carry (AC) flags; they are listed in the Table
and their bit positions in the flag register are shown in the Figure. The most commonly used
flags are Zero, Carry, and Sign. The microprocessor uses these flags to test data conditions.
For example, after an addition of two numbers, if the sum in the accumulator id larger than
eight bits, the flip-flop uses to indicate a carry called the Carry flag (CY) is set to one. When
an arithmetic operation results in zero, the flip-flop called the Zero (Z) flag is set to one. The
first Figure shows an 8-bit register, called the flag register, adjacent to the accumulator.
However, it is not used as a register; five bit positions out of eight are used to store the
outputs of the five flip-flops. The flags are stored in the 8-bit register so that the programmer
can examine these flags (data conditions) by accessing the register through an instruction.
These flags have critical importance in the decision-making process of the microprocessor.
The conditions (set or reset) of the flags are tested through the software instructions. For
example, the instruction JC (Jump on Carry) is implemented to change the sequence of a
program when CY flag is set. The thorough understanding of flag is essential in writing
assembly language programs.
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 microprocessor uses this register to sequence the execution of the instructions.
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.
Stack Pointer (SP)
The stack pointer is also a 16-bit register used as a memory pointer. It points to a
memory location in R/W memory, called the stack. The beginning of the stack is defined by
loading 16-bit address in the stack pointer. The stack concept is explained in the chapter
"Stack and Subroutines."

Vous aimerez peut-être aussi