Question: The Project: The project has three active - low input switches S 1 , S 2 , and S 3 with external pull - up

The Project:
The project has three active-low input switches S1, S2, and S3 with external pull-up resistors connected to PA1, PA4, and PBO, respectively; and four active-low LEDs connected to PA5, PA6, PA7, and PB6, respectively; active-low active buzzer connected to PB3. The complete circuit for the project is shown in Figure 1. Practically this project is used in systems such as in roulette wheel. (SK7)
1. When the power is connected, the patterns 0001,0011,0111, and 1111 should be displayed alternately at 500ms intervals continuously.
2. If St is pressed and held, all LEDs should toggle at 500ms intervals continuously, and there are two variables (variable 1 and variable 2) that must be consistently random and displayed on the left and right of the 4-digit 7-segment display accordingly.
3. If S1 is released, the random numbers held by those 2 variables are displayed on the left and right of the 4-digit 7-segment display. The content of the two variables should be limited from 1 to 6.
4. If the content of variable 1 is equal to that of variable 2 and equal to 6, the buzzer sounds for 2000ms and all LEDs should turn ON.
5. If the content of variable 1 and variable 2 are the same, the buzzer sounds for 1000ms, and the LED pattern should be 1001.
6. If variable 1's content differs from variable 2's, the buzzer sounds for 3000ms, and the LED pattern should be 0110.
7. The program sequence switches to step 1, after completing any of steps 4,5, or 6.

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!