Design a 4-botton lock (red, blue, green and black) using T flip flop. The lock will open only when
Red, Green,Black and Red buttons are pressed in sequence.
Note: Assigning 2-bit value to each button will reduce the complexity of design.
Solution:
Step 1 – State Diagram Describing the system
Step 2 - 4 possible state 2 Flip Flops required
Use D flip flop since not specified.
Reset (^) R
RGB (^) RG
Note:
All input not shown will move the FSM to Reset State.
Red
Green
Black
Red
Key Code
k1 k0 Colo r
0 0 Red
0 1 Blue
1 0 Green
1 1 Black
Lock Controller
System Diagram
K0
K1
Open
0 – Lock
1 - Unlock
Red Blue Green Black