MP8085 2
MP8085 2
MP8085 2
Dr. Ritika
Department of Computer Application
8085 MPU
Tri-State Devices
Tri-State Devices
When enable E is high the gate is enabled and the output Q can be 1 or 0 (if A is 0, Q is 1, otherwise Q is 0). However, when E is low the gate is disabled and the output Q enters into a high impedance state.
8085 is 8-bit general purpose microprocessor. Capable of addressing 64K (2 = 65,536 registers ) of
16
8085 MPU
memory.
o DATA BUS
o CONTROL STATUS o POWER SUPPLY AND FREQUENCY o EXTERNALLY INITIATED SIGNALS o SERIAL I/O PORTS
330_01
A8 - A15 (output; 3-state) It carries the most significant 8 bits of the memory address or the 8 bits of the
I/O address;
AD0 - AD7 (input/output; 3-state) These multiplexed set of lines used to carry the lower order 8 bit address as
During the opcode fetch operation, in the first clock cycle, the lines deliver the
In the subsequent IO / memory, read / write clock cycle the lines are used as
lower order address A0 - A7. data bus.
The CPU may read or write out data through these lines.
ALE
RD (active low) - Read memory or IO device. This indicates that the selected WR (active low) - Write memory or IO device. This indicates that the data on (output) - Select memory or an IO device. T his status signal indicates that
the data bus is to be written into the selected memory location or I/O device. the read / write operation relates to whether the memory or I/O device. It goes high to indicate an I/O operation. It goes low for memory operations. but they are rarely used in small systems. memory location or I/O device is to be read and that the data bus is ready for accepting data from the memory or I/O device.
(output) - Address Latch Enable. This signal helps to capture the lower order address presented on the multiplexed address / data bus.
S1 and S0: These status signals, similar to , can identify various operations,
8085 Microprocessor Pinout and Signals All the operations and their associated status signals are listed in Table for reference :
8085 Microprocessor Pinout and Signals: Power Supply And Clock Frequency
CLK (OUT) Clock Output: This signal can be used as the system
clock for other devices.
8085 Microprocessor Pinout and Signals Externally Initiated Signals, Including Interrupts
The 8085 have five interrupt signals that can be used to interrupt a program
execution. One of the signals, INTR (Interrupt Request), is identical to the 8080A microprocessor or interrupt signal (INT); the others are enhancement to the 8080A. The microprocessor acknowledges an interrupt request by the INTA (Interrupt Acknowledge) signal.
RESET IN: When the signal on this pin goes low, the program counter is set
to zero, the buses are tri-stated, and the MPU is reset.
RESET OUT: This signal indicates that the MPU is being reset. This signal
The 8085 have two signals to implement the serial transmission: SID (Serial
Example of 8085Microcomputer
8085 Microcomputer includes:
8085 Microprocessor. An octal latch(de-multiplexes the buses AD7-AD0 using signal ALE). Logic gates (to generate control signals). Interfacing devices buffers, decoders and latches. Unidirectional Bus Driver for address bus (to increase the driving
Bidirectional Bus Driver for data bus (to increase the driving capacity
of bus)
capacity of bus)
TIMING DIAGRAM
Timing Diagram is a graphical representation. It represents the execution time taken by each instruction in a graphical format. The execution time is represented in T-states. Instruction Cycle:
Machine Cycle:
The machine cycle and instruction cycle takes multiple clock periods. A portion of an operation carried out in one system clock period is called as
Opcode fetch cycle (4T) Memory read cycle (3T) Memory write cycle (3T) I/O read cycle (3T)
Each instruction of the processor has one byte opcode. The opcodes are stored in memory. So, the processor executes the
opcode fetch machine cycle to fetch the opcode from memory.
The time taken by the processor to execute the opcode fetch cycle
is 4T.
In this time, the first, 3 T-states are used for fetching the opcode
from memory and the remaining T-states are used for internal operations by the processor.
Step 1: The microprocessor places the 16-bit memory address from the
program counter (PC) on the address bus. At T1 20H is placed on A15-A8 and 05H is placed on AD7-AD0. ALE goes high, goes low.
Step 2: The control unit sends the control signal RD to enable the memory
chip. It is active during 2 clock periods.
Step 3: The byte (4FH)from the memory location is placed on the data bus
(AD7-AD0) when memory is enabled and when RD goes high it causes buses to go into high impedance.
Address on high-order bus (20H) remains on bus for three clock periods.
When ALE goes high (during T1), the latch is transparent (output changes
according to input). During T1 output of latch is 05H.
When ALE goes Low, the data byte 05H is latched until next ALE, and
output of latch represents the low-order address bus AD7-AD0 after latching operation.
The processor takes 3T states to execute this cycle. The instructions which have more than one byte word size (like
Immediately after the termination of the low order address, at the beginning of
the T2, data is asserted on the address/data bus by the processor.
WR control is activated near the start of T2 and becomes inactive at the end of
T3. The processor maintains valid data until after WR is terminated. This ensures that the memory or port has valid data while WR is active.
To understand the memory read machine cycle, lets study the execution of the following instruction MVI A, 32
In memory, this instruction looks like: -The first byte 3EH represents the opcode for loading a byte into the accumulator (MVI A),
the second byte is the data to be loaded.
The 8085 needs to read these two bytes from memory before it can execute the instruction. Therefore, it will need at least two machine cycles.
-The first machine cycle is the opcode fetch. -The second machine cycle is the Memory Read Cycle.
2001H 32H
M1 (Opcodefetch) T
2
T
1
T
3
T
4
M2 (Memory Read) T T T
1 2 3
Unspecified
32H; Data
RD
Execution Times of Memory Read Cycle and Instruction cycle are calculated as:
Time required to execute 1 T-state = 1/ operating frequency of 8085 Microprocessor
For example operating frequency = 2MHz then time required to execute 1 T-state = 0.5 Sec Execution Time for Opcode Fetch: (4T)x.5=2 Sec Execution Time for Memory Read: (3T)x.5= 1.5 Sec Execution Time for Instruction: (7T)x.5= 3.5 Sec
Operand
2065
Bytes
3
Machine Cycles 4
T-states
13
Machine Codes are stored in 2010H, 2011H and 2012H in reverse order Memory Address 2010 2011 2012 Machine Code 0011 0010->32H Opcode 0110 0101->65H Low Order Address 0010 0000-> 20H High-order Address
In the first machine cycle, the 8085 places address 2010H on the address bus
and fetch the opcode 32H.
The second machine cycle is Memory Read. The processor places the address
2011H and get the low-order byte 65H.
The third machine cycle is also Memory Read, the 8085 get the high order byte
20H from memory location 2012H.
The last machine cycle is memory write. The 8085 places the address 2065H
on the address bus, identifies the operation as Memory Write (IO/M=0 S1=0 and S0=1). It places contents of data bus AD7-AD0 and asserts the WR signal. During the last T-state the contents of data bus are placed in memory location 2065H.
Assume the memory address for the instruction and let the content of
accumulator is C7H. So, C7H from accumulator is now stored in 2065H.