Question: Groups 4 , 1 0 , 1 6 : Write a program that implements an electronic combination lock. Eight buttons should be connected to PORTB,
Groups : Write a program that implements an electronic combination lock. Eight buttons should be connected to PORTB, seven of them named A B C D E F G and one representing an ENTER key. Three pins on another port should be wired to drive red, yellow, and green LEDs. The user should enter a sequence of five letters followed by the ENTER key. You choose the sequence.
Hint: To avoid the problem of switch bouncing multiple contacts on one push you should include a delay of after a button push. You also need to wait for a button to be released before looking for the next button push.
While the program is ready for input, or input is in progress, the yellow LED should be lit. If a correct sequence is entered, the green LED should light for two seconds. If an incorrect sequence is entered, the red LED should light for two seconds. After the two seconds, the program should go back to being ready for input.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
