Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Embedded Systems IE403

Lab Work

Lab #1

Objective:
To Observe the Output of the ALE Pin of 8051 Microcontroller

Theory
The ALE is abbreviated for Address Latch Enable. This is an output pin located at pin 30 of the 8051 microcontroller. ALE is controlled entirely by the microcontroller to allow it to multiplex the low-byte of a memory address and the 8-bit data itself on port 0. This is necessary because, while the high-byte of the memory address is sent on port 2, port 0 is used to send both the low-byte of the memory address and data itself. How ALE Multiplexes Address and Data Multiplexing is accomplished by placing the low-byte of the address on port 0, asserting ALE high to latch the low-byte of the address into a latch IC (such as the 74LS573), and then placing the eight data bits on port 0. In this way the 8051 is able to output a 16-bit address and an 8-bit data with 16 I/O lines instead of 24. It turns out that ALE pin is a great pin saver for microcontroller ICs. The ALE line is used in this fashion both for accessing external RAM with MOVX @DPTR as well as for accessing instructions in external code memory. ALE Operating Modes In normal operation ALE is emitted twice every machine cycle. Since one machine cycle takes 12 clock cycles, the ALE pulses will be taking 6 clock cycles. This means that frequency of ALE pulses will be 1/6th of the clock frequency. Thus if clock oscillator is operating at 11.0592 MHz, ALE will pulse at a frequency of 11.0592 / 6 = 1.8432 MHz. However, one exception is that during external data memory access (MOVX instruction) one ALE pulse is skipped in lieu of a pulse on WR or RD. Uses In normal operation ALE can be used for external timing or clocking. In fact an important use of ALE pin is to detect whether the microcontroller is working properly by verifying the ALE waveforms as shown in figure 1.

Figure 1: Clock and ALE Waveforms

Group Members:

Ali Asad (1936)

Safdar Abbasi (1926)

You might also like