Professional Documents
Culture Documents
Micro Da 3 - Bce2167
Micro Da 3 - Bce2167
MICROPROCESSORS AND
MICROCONTROLLERS
Digital Assignment-3
Md Altamas Raza
22BCE2167
Q1. Write an 8051 ALP program to generate a pulse waveform with given duty cycle using timer.
OUTPUT:
RESULT:
Thus, the pulse waveform for 25% duty cycle is generated and monitored.
Q2. Write an 8051 ALP program to generate a pulse waveform with given time-period using timer. T =
xx ms (Reg: 22BCE29xx = 06).
CALCULATION:
PROCEDURE:
CODE:
OUTPUT:
RESULT:
Thus, the pulse waveform for a wave of time period 6ms has been generated.
Q3. Write an 8051 ALP to get the radius of sphere (8-bit) from port P1. Calculate the volume (V) and
total surface area (A). Send the following messages through UART1. “Volume of the sphere is V” “Total
surface area is A”.
PROCEDURE:
CODE:
OUTPUT:
RESULT:
Thus, the surface area and volume of the sphere has been calculated and transmitted serially.