Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 3130 – Digital Electronics and Design Lab 6 State Machines Fall 2012 Allan Guan.

Similar presentations


Presentation on theme: "ECE 3130 – Digital Electronics and Design Lab 6 State Machines Fall 2012 Allan Guan."— Presentation transcript:

1 ECE 3130 – Digital Electronics and Design Lab 6 State Machines Fall 2012 Allan Guan

2 What is a State Machine? A model of a machine that can be in one of several states (e.g. traffic lights) Different representations: – State tables – State diagrams – State equations Allan Guan

3 Mealy and Moore State Machines Mealy machine – Output values are determined by both the current state and the current inputs Moore machine – Output values are determined solely by the current state Allan Guan

4 Objectives Design both a Mealy and Moore machine to detect the sequence, 1010, in a bit pattern Draw a state table Implement a Mealy machine using D flip-flops Allan Guan

5 Moore Machine Present State Next StateOutput Input=0Input=1 S 1 (000) S 2 (001)0 S 3 (010)S 2 (001)0 S 3 (010)S 1 (000)S 4 (011)0 S 3 (010)S 2 (001)0 S 5 (100)S 1 (000)S 4 (011)1 Allan Guan

6 Mealy Machine Current State Next StateOutput Input=0Input=1Input=0Input=1 S 1 (00) S 2 (01)00 S 3 (10)S 2 (01)00 S 3 (10)S 1 (00)S 4 (11)00 S 3 (10)S 2 (01)10 Allan Guan

7 Mealy Implementation using DFF Inputs of combinational circuit Output of combinational circuit Present stateInputNext stateFlip flop inputs output ABxABDADBy 00000000 00101010 01010100 01101010 10000000 10111110 11010101 11101010 Allan Guan

8 Circuit Implementation Allan Guan

9 Output Allan Guan


Download ppt "ECE 3130 – Digital Electronics and Design Lab 6 State Machines Fall 2012 Allan Guan."

Similar presentations


Ads by Google