Edsim51_Version 2.1.32
EXPERIMENT #2 (MICROPROCESSOR): BASIC IO AND ARITHMETIC
OBJECTIVES: To understand the fundamental IO, arithmetic, and display functions of the 8051 Microcontroller
EQUIPMENT: EdSim51 emulator software or equivalent
TASK: Design and write the necessary program code to perform the following: Consider a Y road junction where two one-way streets merge into one. Determine the sequence of traffic light changes. As the traffic is always slow at the junction, vehicles from each merging street are only given a few seconds in turn: countdown from #19 to #14 is displayed using 7-segment displays. Study the schematic diagram of your microcontroller emulator and decide which ports can be used to control your traffic lights, and which ports can be used to display the countdown on the 7-segment displays. Write the code for controlling the sequence of your traffic lights and the countdown display.