Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Electronic lock - design

Status
Not open for further replies.

darthachill

Newbie level 3
Joined
May 22, 2016
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
27
Hi everyone

I try to design electronic lock by using Moore'a machine. The problem is that im not sure that my graph is correct.

More Information:
Input: 1,2, OK, Reset
Output: Open, Alarm (acrive after OK)
code: 1221

Please help me answer this question.
Greetings!
 

Attachments

  • grafMoore.png
    grafMoore.png
    71.7 KB · Views: 39

Some state transitions aren't clearly annotated. In so far it's hard to say if the graph is correct. Which transitions are e.g. triggered by the reset input?

Generally, this can't be the complete state machine description. There must be key-press detection and debouncing to make a working electronic lock. Also usually a time-out.
 


and debouncing
Its really necessary?
I have never done this before, and I have no idea how it can change my graph.
Yes it's necessary, switches when switched bounce, i.e. the contacts open/close a bunch of times before settling on either open or closed. As this input is sampled by a clock you might see this chattering input as a valid input.

You FSM looks reasonable, but I don't know if the ALARM state is correct or not as you don't have any description of how that is supposed to behave. I also don't see any reason to attempt to gray code the states as there are many transitions that will result in multiple bits changing during that transition, might as well make it straight binary, or just use enumerated state names.
 

key-press detection is : 1221 OK

Look sharp. How do you avoid key "2" advancing from state "001" to state "010" without waiting for a second key press?
 

Look sharp. How do you avoid key "2" advancing from state "001" to state "010" without waiting for a second key press?

Edge detection of the key press, after debouncing.

Oops maybe that was a test question you were giving the OP ;-)
 

No problem, both question and answer are hopefully helpful.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top