Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

state diagram sequence recognizer

Status
Not open for further replies.

daillengineer

New Member
i need to draw a state diagram that recognizes the sequence 1011 with an overlap. i believe there is 4 states and that once the sequence is recognized it goes back to state B. can someone draw this for me and give an explanation. this is the only part of the class i just cant seem to grasp. thank you.
 
The idea behind state machines that recognise sequences is fairly simple. You only need 2 types of states for this state machine. The first is for 0s in the sequence and the other is for 1s. Each one has two transitions - if the input matches its recognition value then it transitions to the next state on the line, otherwise it transitions back to the first state. For each correct value receive it moves down one in the line. If it reaches the last state then you know the sequence is correct. If any value received is incorrect it resets the state machine and the sequence need to start over.

Because this sounds like homework if you post your best guess we can tell you if you have any mistakes or missunderstandings and give you more help.
 
this is my best guess...

[/img]
 

Attachments

  • 1011_again.jpg
    1011_again.jpg
    43.2 KB · Views: 882
Thats really close. There are a couple problems. In state C because you stay in state C if they enter 0 it allows any number of 0s in that place and would still recognise it as a valid sequence - 1000011 would be recognised as a valid sequence. In state C the incorrect input should take you back to state A which would restart the recognition.

The 1/1 transition for state D depends on how you want the sequence recognition defined. The way you have it now it would recognise two sequences in a row with the last and first 1s overlapping. 1011011 would be recognised as 2 separate sequences. If this is ok then if you change the C transition as I said above it should work. If you want to dissallow this sort of overlap just have the 1/1 transition go to state A.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top