Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
A simple microprocessor unit might have 16 address lines, which form one way
address bus. For an 8 bit processor the MPU also has the typical 8-buffered data lines,
which connect to the two way data bus.
There are two types of semiconductor memory used in this system. The ROM is
the permanent memory, which probably contains the monitor program for the system.
The ROM has address inputs along with chip-select and read-enable input lines. For an 8-
bit microprocessor the ROM also has 8-bit buffered three-state outputs connected to the
data bus. Each memory word is then 8-bit wide.
The architecture also shows a RAM as the temporary read /write storage devices.
The RAM has address inputs along with chip-select and read /write enable inputs. The
RAM has 8-bit buffered three-state outputs connected to the data bus. This RAM inputs,
outputs and stores data as8-bit words.
The microcomputer uses a group of seven-segment display for output. The display
is connected to the power supply on the right. A special display interface circuit or IC is
used to store the data and drive the displays. When activated by the address, chip-select
and enable signal displays continuously, showing the data stored in the display interface
in visual form.
The 8085 MPU performs the functions using three set of communication lines
called buses. 1 address bus. 2 data bus. 3 control bus. These buses are shown in one group
called the system bus.
ADDRESS BUS
DATA BUS
Data bus is a group of eight lines used for data flow. These lines are bidirectional,
data floe in both directions between the MPU and memory and peripheral devices. The
MPU uses the data bus to perform the second function, transferring data.
CONTROL BUS
It is the bus, which totally controls the operation of the system. It is also used to
control the timing of execution. The Control bus is not groups of lines like address or
data buses, but individual lines that provide a pulse to indicate an MPU operation. The
MPU generates specific control signals for every operation (such as memory read or I/O
write) it performs.
Address bus
The 8085 has eight signal lines, A15 A8 which are unidirectional and used as the
high order address bus.
These status signals (S1 and S0) are used to know the type of current operation the
CPU performs.
S1 S0 DATA BUS STATUS
0 0 HALT
0 1 WRITE
1 0 READ
1 1 FETCH
READY (Input)
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 for Ready
to go high before completing the read or write cycle.
HOLD (Input)
Indicates that another Master is requesting the use of the Address and Data uses.
The CPU, upon receiving the Hold request. will relinquish the use of buses as soon as the
completion of the current machine cycle. Internal processing can continue. The processor
can regain the buses only after the Hold is removed. When the Hold is acknowledged, the
Address, Data, RD, WR, and IO/M lines are 3stated.
HOLD (Input)
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 buses as soon as the
completion of the current machine cycle. Internal processing can continue. The processor
can regain the buses only after the Hold is removed. When the Hold is acknowledged, the
Address, Data, RD, WR, and IO/M lines are 3stated.
RST 5.5
RST 7.5
RESTART INTERRUPTS
These three inputs have the same timing as I NTR except they cause an internal
RESTART to be automatically inserted.
RST 6.5
The priority of these interrupts is ordered as shown above. These interrupts have a higher
priority than the INTR.
TRAP (Input)
Trap interrupt is a non-maskable restart interrupt. It is recognized at the same time
as INTR. It is unaffected by any mask or Interrupt Enable. It has the highest priority of
any interrupt.
RESET IN (Input)
Reset sets the Program Counter to zero and resets the Interrupt Enable and HLDA flip-
flops. None of the other flags or registers (except the instruction register) are affected The
CPU is held in the reset condition as long as Reset is applied.
CLK (Output)
Clock Output for use as a system clock when a crystal or R/ C network is used as
an input to the CPU. The period of CLK is twice the X1, X2 input period.
IO/M (Output)
IO/M indicates whether the Read/Write is to memory or l/O Tristated during Hold
and Halt modes.
SID (Input)
Serial input data line The data on this line is loaded into accumulator bit 7
whenever a RIM instruction is executed.
SOD (output)
Serial output data line. The output SOD is set or reset as specified by the SIM
instruction.
Vcc
+5 volt supply.
Vss
Ground Reference.
Accumulator
Accumulator is an 8- bit register. It holds one of the data to be processed by
arithmetic logic unit (ALU). It also stores the result of the operation. The accumulator is
also called as A- register.
Temporary Register
The temporary register receives one data to be processed by ALU from external
memory or general purpose registers.
FLAG REGISTER
There are five flags in 8085, which are sign flag (8), zero flag (Z), auxiliary carry
flag (AC), parity flag (P) and carry flag (CY). The bit positions reserved for these flags in
the flag register are shown in figure below.
After an ALU operation, if the most significant bit of the result is 1, then sign flag is set.
The zero flag is set, if the ALU operation results in zero and it is reset if the result is non-
zero. In an arithmetic operation, when a carry is generated by the lower nibble, the
auxiliary carry flag is set. After an arithmetic or logical operation, if the result has an
even number of 1 's the parity flag is set, other wise it is reset.
If an arithmetic operation results in a carry, the carry flag is set other wise it is reset.
Among the five flags, the AC flag is used internally for BCD arithmetic and other four
flags can be used by the programmer to check the conditions of the result of an operation.
REGISTER ARRAY
Apart from Accumulator (A-register), there are six general-purpose
programmable registers B, C, D, E, H and L.
They can be used as 8-bit registers or paired to store l6-bit data. The allowed pairs
are B-C, D-E and H-L.
The temporary registers W and Z are intended for internal use of the processor
and it cannot be used by the programmer.
Interrupt Control
AD15-AD0
These are the time multiplexed memory I/O address and data lines.
Address remains on the lines during T1 state, while the data is available on the data bus
during T2, T3, Tw and T4.
These lines are active high and float to a tristate during interrupt acknowledge and local
bus hold acknowledge cycles.
A19/S6,A18/S5,A17/S4,A16/S3
These are the time multiplexed address and status lines.
During T1 these are the most significant address lines for memory operations.
During I/O operations, these lines are low. During memory or I/O operations, status
information is available on those lines for T2,T3,Tw and T4.
The status of the interrupt enable flag bit is updated at the beginning of each clock cycle.
The S4 and S3 combinedly indicate which segment register is presently being used for
memory accesses as in below fig.
These lines float to tri-state off during the local bus hold acknowledge. The status line
S6 is always low.
The address bit are separated from the status bit using latches controlled by the ALE
signal.
S3 S4 Indication
0 0 Alternate Data
0 1 Stack
1 0 Code or none
1 1 Data
BHE /S7
The bus high enable is used to indicate the transfer of data over the higher order
( D15-D8 ) data bus as shown in table. It goes low for the data transfer over D15-D8 and
is used to derive chip selects of odd address memory bank or peripherals. BHE is low
during T1 for read, write and interrupt acknowledge cycles, whenever a byte is to be
transferred on higher byte of data bus. The status information is available during T2, T3
and T4. The signal is active low and tri-stated during hold. It is low during T1 for the first
pulse of the interrupt acknowledges cycle.
BHE A0 Indication
0 0 Whole Word
0 1 Upper Byte from or even address
1 0 Lower Byte from or even address
1 1 None
RD Read
This signal on low indicates the peripheral that the processor is performing
memory or I/O read operation. RD is active low and shows the state for T2, T3, Tw of
any read cycle. The signal remains tri-stated during the hold acknowledge.
READY
This is the acknowledgement from the slow device or memory that they have
completed the data transfer. The signal made available by the devices is synchronized by
the 8284A clock generator to provide ready input to the 8086. The signal is active high.
INTR-Interrupt Request
This is a triggered input. This is sampled during the last clock cycles of each
instruction to determine the availability of the request. If any interrupt request is pending,
the processor enters the interrupt acknowledge cycle.
This can be internally masked by resulting the interrupt enable flag. This signal is
active high and internally synchronized.
TEST
This input is examined by a WAIT instruction. If the TEST pin goes low,
execution will continue, else the processor remains in an idle state. The input is
synchronized internally during each clock cycle on leading edge of clock.
MN/MX
The logic level at this pin decides whether the processor is to operate in either
minimum or maximum mode.
The following pin functions are for the minimum mode operation of 8086.
M/ IO Memory/IO
This is a status line logically equivalent to S2 in maximum mode. When it is low,
it indicates the CPU is having an I/O operation, and when it is high, it indicates that the
CPU is having a memory operation. This line becomes active high in the previous T4 and
remains active till final T4 of the current cycle. It is tri-stated during local bus hold
acknowledge .
S2 S1 S0 Indication
0 0 0 Interrupt Acknowledge
0 0 1 Read I/O Port
0 1 0 Write I/O Port
0 1 1 Halt
1 0 0 Code Access
1 0 1 Read Memory
1 1 0 Write Memory
1 1 1 Passive
LOCK
This output pin indicates that other system bus master will be prevented from
gaining the system bus, while the LOCK signal is low. The LOCK signal is activated by
the LOCK prefix instruction and remains active until the completion of the next
instruction. When the CPU is executing a critical instruction which requires the system
bus, the LOCK prefix instruction ensures that other processors connected in the system
will not gain the control of the bus.
The 8086, while executing the prefixed instruction, asserts the bus lock signal
output, which may be connected to an external bus controller.
8086 ARCHITECTURE
The 8086 processor is divided into two independent functional units. They
are,
The bus interface unit (BIU).
The Execution Unit (EU).
These two units are linked using an internal data bus.
The BIU performs all bus operations such as instruction fetching, reading and writing
operands for memory and calculating the addresses of the memory operands. The
instruction bytes are transferred to the instruction queue. BIU contains Instruction queue,
Segment registers, Instruction pointer, and Address adder
EU executes instructions from the instruction system byte queue. EU contains Control
circuitry, Instruction decoder, ALU, Pointer and Index register, Flag register.
Both units operate asynchronously to give the 8086 an overlapping instruction fetch
and execution mechanism which is called as Pipelining. This results in efficient use of the
system bus and system performance.
Bus Interface Unit
The Bus interface unit (BIU) fetches instruction, reads data from memory
and peripherals and writes data into memory and peripherals.
It contains segment registers, instruction pointer, instruction queue and
address generation / bus control circuit to provide functions such as
fetching and queuing of instruction and bus control.
The BIUs instruction queue is a First in First out (FIFO) group of registers
in which up to six bytes of instruction code are projected from memory.
This is done to speed up program execution by overlapping instruction
fetch with execution. This mechanism is referred to as pipe lining.
If queue is full, the BIU does not perform any bus cycle, BIU does not pre-
fetch any instructions. Therefore, BIU may pre-fetch the instructions from
memory until queue is full.
While fetching the instruction from memory. if the Execution Unit (EU)
interrupts the BIU for memory access, the BIU first complete fetching and
then services the EU.
If a subroutine call or Jump instructions are encountered, the BIU will reset
the queue and begin refilling after passing the new instruction to the EU.
BIU contains an adder, which is used to produce the 20-bit address. The bus
control logic of the BIU generates all the bus control signals such as read
and writes signals for memory and I/O.
Segment registers
Execution Unit
The Execution unit fetches instruction from the instruction queue. The
above instruction is stored in the decoder. The decoder translates each instruction
into sequence of action, which execution unit carries out.
All the above actions are controlled by the control circuitry. Control
circuitry generates appropriate signals at fixed intervals of time.
Flag register
X X X X O D I T S Z X AC X P X CY
O Overflow Flag
D Direction Flag
I Interrupt Flag
T Trap Flag
S Sign Flag
Z Zero Flag
AC Auxiliary Carry Flag
P Parity Flag
CY Carry Flag
X Not Used
Bus a group of lines (wires) used to transfer bits between the microprocessor and
other components of the computer system.
The IO/M is a status signal When it is high, it indicates an I/O operation; when it
is low, it indicates a memory operation.
WR It is writing control signal and it is asserted low whenever processor writes date
to memory or I/O port
The basic units of microprocessor are ALU, Register Array and control Unit.
The 8086 can operate in two modes and they are minimum (or uniprocessor)
mode and maximum ( or multiprocessor) mode.
The 8086 can operate on either 8-bit or 16-bit data. The 8086 uses 20 bit address
to access memory and 16-bit address to access 1/0 devices.
In pipelined architecture the processor will have number of functional units and the
execution time of functional units are overlapped. Each functional unit
works independently most of the time.
1. What is Microprocessor?
2. What are the basic units of a microprocessor?
3. What is a bus?
4. Define Bit, Byte and Word.
5. Why the data bus is bidirectional?
6. What is the function of Accumulator?
7. List the four operations commonly performed by the MPU.
8. Specify the function of the address bus and the direction of the information flow
on the address bus.
9. What is pipelined architecture?
10. What is the function of the WR signal on the memory chip?
11. How many memory locations can be addressed by a microprocessor with 14
address lines?
12. State the function of ALE signal of the 8085microprocessor.
13. Show the bit position of various flags in 8085.
14. What is program counter?
15. Mention the names of various registers in 8085 along with its size.
16. What are the machine control flags of 8086?
17. List the flags of 8086
18. What is instruction pipelining?
19. What is queue? How queue is implemented in 8086?
20. What are the functional units available in 8086 architecture?
21. State the function of Data Segment in 8086.
22. What are the modes in which 8086 can operate?
23. State the function of IO/M in 8086.
24. What are the various segment registers in 8086?
25. What is the data and address size in 8086?
Part B
1. Sketch the functional block diagram of general 8-bit microprocessor and explain
its function.
2. Draw the functional block diagram of 8085 p and explain their functions.
3. Draw the pin diagram of 8085 p and explain the function of each pin.
4. Draw and explain about
i) Bus structure of 8085 p
ii) Flag register of 8085 p
5. Discuss the function of following
i) General purpose registers.
ii) Timing and control unit
iii) Stack pointer
6. Draw the Architecture of 8086 p and explain their functions.
7. Draw the pin diagram of 8086 p and explain the pin functions for minimum mode
operation.
8. With neat sketch explain the following
i) Flag register of 8086 p.
ii) Segment register.
9. Sketch the pin diagram of 8086 p and explain the pin functions for maximum mode
operation.
10. Discuss about the following
i) General purpose register of 8086
ii) Control circuitry and instruction decoder.