2081 2

CSC167 ยท 2081 ยท 10 marks

What is ALE signal? Draw a timing diagram for LDA 5000H instruction and explain the machine cycles involved.

What is ALE signal? Draw a timing diagram for LDA 5000H instruction and explain the machine cycles involved.[10]

MicroprocessorChapter 3: Instruction CycleMachine Cycle

Quick answer

ALE (Address Latch Enable) is a control signal generated by the 8085 microprocessor. It is an active HIGH output signal that is used to demultiplex the lower-order address bus from the data bus.

ALE Signal and Timing Diagram for LDA 5000H Instruction


Part 1: ALE Signal (Address Latch Enable)

Why ALE is Needed:

The 8085 has a multiplexed address/data bus. The lower 8 bits of the address (A0-A7) share the same physical pins as the 8-bit data bus (AD0-AD7). To separate the address from the data, the ALE signal is used.

How ALE Works:

  • ALE goes HIGH at the beginning of the first T-state (T1) of every machine cycle.
  • During T1, when ALE is HIGH, the lower 8-bit address (A0-A7) is present on the AD0-AD7 lines.
  • An external latch (e.g., 74LS373) captures and holds this lower address when ALE goes LOW.
  • After ALE goes LOW (from T2 onwards), the AD0-AD7 lines are used as the data bus.
  • The higher-order address bits (A8-A15) remain on the dedicated address bus throughout the machine cycle.

In short: ALE = 1 means address is on AD0-AD7; ALE = 0 means data is on AD0-AD7.


Part 2: LDA 5000H Instruction

Meaning:

LDA 5000H means Load Accumulator Direct from memory address 5000H.

  • The contents of memory location 5000H are loaded into the Accumulator (A).
  • It is a 3-byte instruction: Opcode (3AH) + Low byte of address (00H) + High byte of address (50H).

Machine Cycles Involved:

LDA 5000H consists of 4 machine cycles and a total of 13 T-states:

Machine CycleTypeT-StatesOperation
MC1Opcode Fetch (OF)T1-T4Fetch opcode 3AH from memory (PC address)
MC2Memory Read (MR)T1-T3Read low byte of address (00H) from PC+1
MC3Memory Read (MR)T1-T3Read high byte of address (50H) from PC+2
MC4Memory Read (MR)T1-T3Read data from address 5000H into Accumulator

Part 3: Timing Diagram for LDA 5000H

Assume the instruction starts at memory address 2050H.

         MC1 (Opcode Fetch)      MC2 (Mem Read)    MC3 (Mem Read)    MC4 (Mem Read)
         T1   T2   T3   T4       T1   T2   T3       T1   T2   T3      T1   T2   T3
          |    |    |    |        |    |    |         |    |    |       |    |    |
CLK    __| |__| |__| |__| |____| |__| |__| |_______| |__| |__| |_____| |__| |__| |__

ALE    _____|   |_________________|   |_______________|   |_____________|   |________
       HIGH at T1 of each MC

A8-A15 --[  20H  ]---------------[  20H  ]----------[  20H  ]--------[  50H  ]------
       (High order address, stable throughout each MC)

AD0-A7 -[2050H lo]-[  3AH  ]-----[2051H lo]-[00H]---[2052H lo]-[50H]-[00H lo]-[data]
        addr(T1)   data(T2-T4)    addr(T1)  data     addr(T1)  data   addr(T1) data

IO/M   ___________________________________________  LOW (Memory operation throughout)

RD     ________|___________________|_______________|_______________|________________
               LOW during read     LOW             LOW             LOW
               (T2-T3)

Cleaner Representation:

CLK:    _|-|_|-|_|-|_|-|_  _|-|_|-|_|-|_  _|-|_|-|_|-|_  _|-|_|-|_|-|_
        T1  T2  T3  T4      T1  T2  T3      T1  T2  T3      T1  T2  T3

        |<---- MC1 ------->|<--- MC2 ---->|<--- MC3 ---->|<--- MC4 ---->|

ALE:    |HIGH|_____________|HIGH|_________|HIGH|_________|HIGH|_________|

A8-A15: |  20H (high byte of 2050H)  |20H |     |20H |     |  50H      |

AD0-AD7:|2050H|  3AH (opcode) |2051H|00H |2052H|50H  |5000H| DATA(Acc) |
        |addr | data          |addr |data |addr |data |addr | data      |

IO/M:   |___________ LOW (Memory) ___________________________________|

RD:     |    |___|   |    |___|    |    |___|    |    |___|           |
              active        active        active        active
              LOW           LOW           LOW           LOW

Part 4: Explanation of Each Machine Cycle

Machine Cycle 1 - Opcode Fetch (4 T-states):

  • T1: PC (2050H) is placed on address bus. ALE goes HIGH. Lower address (50H) latched externally.
  • T2: ALE goes LOW. RD goes LOW.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.