Question: Programming assignment uses the LMC (little Man Computer) It may help to Google it You are to design a traffic light controller. The intersection is

Programming assignment uses the LMC (little Man Computer) It may help to Google it You are to design a traffic light controller. The intersection is N/S and E/W traffic. The N/S lanes have a left turn lane each way. The output is 8 bits as described below. There are 2 bits that describe the color of the traffic light. (hint: Define the numeric values for each combination) When the program starts, you provide input for how long the N/S and the E/W each have a green signal. This is in a form of how many times a loop is executed within your code. A yellow is 3 loops. Left turn, if needed, is green 30 to 38% of the through green period. Each time the signal goes to change, the software will ask if the Left turn needs service. An input of 0x05 states South needs a left turn cycle; 0x0A for North needs a left turn and 0x0F if both need it. The output is as follows: Bit 7 Bit 6 North Light 0 0 Green with left turn active 1 1 Red 0 1 Yellow 1 0 Greed Bit 5 Bit 4 South Light 0 0 Green with left turn active 1 1 Red 0 1 Yellow 1 0 Greed Bit 3 Bit 2 E/W Light 0 0 Invalid 1 1 Red 0 1 Yellow 1 0 Greed Bit 1 Bit 0 Left turn lights 0 0 Invalid 1 1 Red 0 1 Yellow 1 0 Greed If a left turn is needed for either North or South, the Left Turn Lights sequence. Each time a signal changes any of its colors, an output must happen. So starting out, the output may look like 0xFB: North is red, south is red, E/W is green. Counter times out (Loops completed), Output goes to 0xF7. Input asks about Left turn lane. In put given a 0x00, output changes to 0xAF. And so on. If you are having troubling downloading the LMC, you can try the following: Attached is a Zip file with the LMC within.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!