Assignment 1 Questions
Assignment 1 Questions
For the documentation, include algorithm, ALP and attach the snapshot of the simulated
output in Edsim
1. Write an 8051 ALP to find the factorial of a number ‘N’ and verify the
logic using Edsim
2. Write an 8051 ALP to realize the following logic expression using Edsim
RESULT = (AL xor BL’) + (CL * DL) + (Num1 + Num2)
3. Write an 8051 ALP to realise the Analog to Digital conversion using
Edsim.
4. Assume that there is a parking lot which counts the number of vehicles
entering it through a PIR sensor. With the PIR sensor connected to the
Timer 1 pin of 8051, write a ALP to count and display the number of
vehicles in the serial port with baud rate of 9600bps.
5. Write an ALP to read the set of 5 data in the stack and display sequentially
in the output devices connected through port 0 of 8051. Present the
screenshot of the stack locations in Edsim
6. Write an ALP to display the last two digits of your register number in a 7-
segment display with a delay.
K3 CO1 -3
7. Write an ALP to serially transfer your complete register number using
UART of 805. Demonstrate your logic using Edsim
8. Using Edsim, write and verify an ALP to find the average of 10 numbers
using 8051 microcontrollers.
9. Write an ALP to generate a cosine wave using 8051 microcontrollers and
depict the output in the Edsim
10. Given a sequence of 10 numbers. Store the odd numbers starting from the
location 40H and even numbers starting from the location 50H
11. Write an ALP to generate a Fibonacci series of 5 number and store it in the
location starting from 60H, and verify the program using Edsim
12. Write an ALP to generate a sine wave using the port pin P0.7 of 8051 and
verify the program using Edsim
13. Write an ALP to read the data from the location 20h to 30h and count the
number of data that are greater than the number in R3 and lesser than
number in R5. Store the count in R0 and R1. Present your output using
Edsim (Assume suitable values for R3 and R5).
14. Write an ALP to continuously scan port P1. If data is other than FFh call a
subroutine that will multiply it with 10d and send it to port P2. Verify your
logic using EdSim
15. Write an ALP to display the first three letters of your name in the device
connected through P1 of 8051. Demonstrate your output in Edsim
16. Write an ALP to transfer your Date of Birth in a sequence of 1 sec delay
through the serial port of 8051. Demonstrate your output in Edsim
17. Assume that an IR sensor is connected at the entrance of a room.
The sensor is intended to sense the person entering the room. The
pulse received from the IR sensor is connected to Timer 0 of 8051.
Write a ALP to read the count of persons in the room and display it
in the LEDs of P0.
18. Consider an 8051 microcontroller based system that peforms the
conversion of letters in alphabets from lowercase to uppercase. Assume
that a switch is connected at port pin P1.3 to enable/disable the
conversion. When P1.3 is set to 1, then the 8051 serial port should
receive any letter in lowercase character (“a” to “z”) from PC keyboard
serially then convert the received lowercase letter into corresponding
uppercase and transmit back to PC via serial port.
19. Write an ALP to read the pack of 10 data received serially at a delay of 1
sec, and store it in the stack location of 40H of 8051. Demonstrate your
output in Edsim
20. Write an ALP to count the pulses inputted through P2.5 at an interval of
1 sec. Store 5 sets of count into the stack location 50H.
21. Write an 8051 ALP to read the key pressed through the keypad and port
the character through serial port of 8051. Demonstrate the logic using
Edsim