Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We want to realize a prototype implementing a program that allows to manipulate the traffic lights ina crossing of two roads. We have three LEDs

We want to realize a prototype implementing a program that allows to manipulate the traffic lights ina crossing of two roads. We have three LEDs (Red, Yellow, Green) in each direction (A and B)which are connected in common cathode. The anode of each LED is connected to a bit of port P0 asfollows:- RA is connected bit0.- YA is connected bit1.- GA is connected bit2.- RB is connected bit4.- YB is connected bit5.- GB is connected bit6.1) Give the values to be sent to port P0 in order to allow the following sequence:- GA is ON, RA and YA are OFF. RB is ON, GB and YB are OFF;- YA is ON, RA and GA are OFF. RB is ON, GB and YB are OFF;- RA is ON, GA and YA are OFF. GB is ON, RB and YB are OFF;- RA is ON, GA and YA are OFF. YB is ON, RB and GB are OFF;2) Write an assembly program in order to allow the previous sequence.Delay for RedA will be the sum of the Delay for GreenB (=6 ms)+ the Delay for YellowB(=2 ms). Choose an appropriate values to write a Delay routine.3) The delay 6 ms and Delay 2 ms will be programmed using the mode 2 of the timers T0 andT1 of the 8051. The XTAL=11.0592MHz and the cycle of the timers 1.085 us.Determine the hexadecimal values to be loaded in the timers.4) Modify the previous program in order to use the timers for the delay purpose.5) The system is modified now by adding 7-segments display (D7A and D7B) in each direction.The system will use the display of a number on the 7-segment display. D7B will be connectedto port P1 and D7A will be connected to port P2. Each digit display will be for a period calledDelay (10).The delay will replaced by the display on the 7-segments of :- Delay for Green (=6) will be display of the values 6 to 0.- Delay for Yellow (=2) will be display of the values 2 to 0.a) Give the sequence of values to be sent to the D7A in order to show the values 6 to 0.b) Give the sequence of values to be sent to the D7B in order to show the values 2 to 0.c) Modify the first program in order to handel lights through port P0 and the delay displayusing D7A and D7B.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Apache Cassandra 3 X An Expert Guide To Improving Database Scalability And Availability Without Compromising Performance

Authors: Aaron Ploetz ,Tejaswi Malepati ,Nishant Neeraj

3rd Edition

1789131499, 978-1789131499

More Books

Students also viewed these Databases questions