Microprocessors and Microcontrollers
Microprocessors and Microcontrollers
CS305
MODULE 1
AD7 AD0
AD15 – AD0:
• Multiplexed memory I/O address and data lines.
• Address remains on the lines during T1 state, while data is available
on the data bus during T2 ,T3 , Tw and T4.
• T1,T2,T3,T4 and Tw are the clock states of a machine cycle.
• Tw is a wait state.
• These lines are active high and float to a tri-state (high impedance
state) during interrupt acknowledge and local bus acknowledge
cycles.
AD7 AD0
0 0 Alternate data
CS305
0 1 Stack
1 0 Code
MODULE 1
1 1 Data
1 1 None
RD – Read :-
• Indicates the peripheral that the processor is performing a memory
or I/O operation.
• Active low –T2,T3,Tw of read cycle.
• Tri-stated during hold acknowledge.
READY:-
• Acknowledgement from the slow devices or memory that they
have completed data transfer.
• Signal is active high.
AD7 AD0
CS305
INTR:- Interrupt Request
• Sampled during last cycle of each instruction to determine the
MODULE 1 availability of the request.
• If any interrupt request is pending, the processor enters the
interrupt acknowledge cycle.
• Internally marked by resetting the interrupt enable flag.
CS305
TEST:-
• This input is examined by a WAIT instruction.
MODULE 1 • If the TEST input goes low, execution will continue, else the
processor remains in an idle state.
• It is used to test the status of math coprocessor 8087.
Coprocessor
• 8087 was the first math coprocessor for 16-bit processors
designed by Intel.
• It was built to pair with 8086 and 8088.
• The purpose of 8087 was to speed up the computations involving
floating point calculations.
AD7 AD0
CS305
RESET:-
• Causes the processor to terminate the current activity and start
MODULE 1 execution from FFFFOH.
• Active high for atleast 4 clock cycles.
• Restarts execution when the RESET returns low.
M / I/O:-
MODULE 1 • Memory I/O (logically equivalent to S2 in maximum mode).
• Low indicates that CPU is having an I/O operation.
MN/MX:- • High indicates that CPU is having a memory operation.
minimum / • Active in the previous T4 and remains active till final T4 of the
maximum
current cycle.
mode
operation .
• Tri-stated during local bus “hold acknowledge”.
CS305
MODULE 1
AD7 AD0
CS305 STEPS
• The cs: ip is loaded with the required address from which the
MODULE 1 execution is to be started.
• Initially ,the queue will be empty and the microprocessor starts a
fetch operation to bring one byte of (first byte )instruction code ,if
the cs:ip address is even.
• The first byte is a complete opcode in case of some
instructions(one byte opcode )and it is a part of opcode in case of
two byte long opcode instruction,and remaining part of opcode lie
in 2nd byte.
• Opcodes along with data are fetched in the queue .when the first
byte from the queue goes for decoding, and interpretation, one byte
in the queue becomes empty and subsequently the queue is
updated.
• The microprocessor does not perform the next fetch operation till
atleast two bytes of the instruction queue are emptied.
AD7 AD0
CS305 • After decoding the first byte ,the decoding circuit decides whether
the instruction is of single opcode byte or double opcode byte.
• If it is single opcode byte, the next bytes in the queue are treated as
MODULE 1 data bytes. otherwise the next byte in the queue is treated as the
second byte of the instruction opcode.
• The second byte is then ,decoded in continuation with the first byte
to decide the instruction length and no of subsequent bytes to be
treated as instruction data.
• The queue is updated after every byte is read from the queue but
the fetch cycle is initiated by BIU only if atleast two bytes of the
queue are empty and EU may concurrently executing the fetched
instructions.
THANK YOU