Q3. Programming.
A Green LED is connected at P2.0, a red LED at P2.1, a door sensor at P1.0 and a buzzer at P1.2.
(2.75 Marks)
Make an 8051 C proAgram where the door sensor can detect if the door is open and will sound the buzzer,
turn on the green LED, and turn off the red LED. On the other hand, when the door is closed, the buzzer will be off,
the green LED will be on, and the red LED will be off.
Draw the circuit, write the Algorithm, draw the flowchart and write the C Language program.
Q3.1 CIRCUIT:
(0.25 Marks)
CLO # 2.2