
A simple exercise with a code lock application using statemachines. Codes are hardcoded, in code_lock_fsm. The application allows three attempts, after which it locks until reset
First code is setup on inputs, and confirmed via enter button, the second code is setup and confirmed. Upon correct code, the lock output goes low.
Preferebly buttons and leds, but digilent analog discovery can also be used
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | code button 0 | ||
| 1 | code button 1 | ||
| 2 | code button 2 | ||
| 3 | code button 3 | open lock output | |
| 4 | enter button | debug output0 | |
| 5 | debug output1 | ||
| 6 | debug output2 | ||
| 7 |