Page 1 of 1

GPIO and FSM The problem consists of simulating a combination lock with the help of the two switches S1 and S2. Initiall

Posted: Tue Sep 07, 2021 7:33 am
by answerhappygod
Gpio And Fsm The Problem Consists Of Simulating A Combination Lock With The Help Of The Two Switches S1 And S2 Initiall 1
Gpio And Fsm The Problem Consists Of Simulating A Combination Lock With The Help Of The Two Switches S1 And S2 Initiall 1 (100.8 KiB) Viewed 59 times
GPIO and FSM The problem consists of simulating a combination lock with the help of the two switches S1 and S2. Initially the RED LED2 is ON signifying that the lock is in the locked state. To open the lock, the switches have to be pressed in the exact sequence S2,S1,S1,S2 which is the code to open the lock. If the correct sequence is provided the GREEN LED2 will be ON and the RED LED2 will go OFF signifying that the lock has entered the unlocked state. If the switches are pressed in any wrong sequence the lock will remain in the locked state with the RED LED2 ON. Once the lock enters the unlocked state it will remain there indefinitely. One needs to reset the board to get into the locked state again and start all over. Write full code in embedded C using driverlib functions. Debouncing switches is not required. You should have a main program which does all the initialization and lights up the LEDs. You should also have a GPIO IRQHandler which accepts the switch inputs and runs the FSM (6)