LAB7
LAB7
Section:
Date Performed:
Creating a delay is most important and widely used function in almost all microcontroller-based
programming. Its use varies from creating a pause to allow microcontroller to interact with real world,
like blinking of LED, monitoring a switch or input at regular interval. In signal processing, a “delay” is
used to monitor signal at a predetermined sampling rate.
Memory
Hex Code Label Mnemonics Comments
Address
Observations for sample program (use blank sheet provided if space not sufficient)
Draw the waveform and mention the delay
The observed waveform indicating a delay of 10ms, as generated by the provided code, suggests that the
program successfully achieves the desired delay functionality. This delay is achieved through a combination of
nested loops in the DELAY subroutine, where the outer loop iterates 18 times and the inner loop iterates 255
times. The execution of these loops effectively consumes time, resulting in the observed delay. Additionally, the
toggling of the P1.1 pin before and after each delay further confirms the proper functioning of the program.
Therefore, the waveform's indication of a 10ms delay aligns with the expected behavior of the code, indicating
its successful execution.
Practical Related Questions
1. For an 8051 microcontroller how long will it take to execute the following
instruction. The crystal frequency is 11.0592 MHz
i) MOV R3,55H
ii) DEC R2.
3. For three different 8051 versions, what will be the machine cycle for the
following crystal frequencies:
i) 11.0592MHz
ii) 16MHZ
iii) 20MHz
Find period of machine cycle in each case.