Download presentation
Presentation is loading. Please wait.
Published byAmelia Barker Modified over 9 years ago
1
Dr. Hoganson CSIS 4381 Finite State Recognizer In this project, we will use the MicroStamp to function as a Finite State Recognizer (FSR). A FSR is a type of Finite State Machine that is used to identify patterns in a stream of inputs. One example is in data comm, where a frame or packet includes special characters – to identify the start of end of a frame, or other control purposes. The machine monitors the stream of incoming bits, and generates a signal or interrupt upon recognizing a control character. Another classic example is a drink machine, that counts coins until the price has been reached, then allows a drink to be released.
2
Dr. Hoganson CSIS 4381 Note: In a course on digital logic, the construction of a FSR is a classic lab exercise. A FSR can be represented with a graph of states, transitions, and inputs: A 1/0 State Transition Input/Output
3
Dr. Hoganson CSIS 4381 FSR Example A FSR for the pattern 1101: (non overlapping) 1/0 A DC B 0/01/1 Start 0/0 1/0 0/0 States: A: haven’t seen anything yet B: have seen a “1” C: have seen a “11” D: have seen a “110” Note that each state has two transitions leaving it (binary). Check: 1100, 11101, 1101101
4
Dr. Hoganson CSIS 4381 FSR Example A FSR for the pattern 1101: (overlapping patterns) 1/0 ADCB 0/0 1/1 Start 0/0 1/0 0/0 A: haven’t seen anything yet B: have seen a “1” C: have seen a “11” D: have seen a “110” This version recognizes 1101 twice in this pattern: 1101101
5
Dr. Hoganson CSIS 4381 FSR Example A FSR for the pattern 0110: (Overlapping patterns) 0/0 ADCB 1/0 0/1 Start 1/0 0/0 1/0 A: haven’t seen anything yet B: have seen a “0” C: have seen a “01” D: have seen a “011” This version recognizes 0110 twice in this pattern: 0110110
6
Dr. Hoganson CSIS 4381 Your next lab project Write a program for the MicroStamp11 to recognize the sequence: 1011. Allow overlapping patterns. Use a switch for the arriving input bit. Use a pushbutton switch to signal the micro-controller that a new bit has arrived, that it needs to check. When the sequence is recognized, light LED 7. For debugging, and as a check, the current “state” of the machine will be displayed using LEDs 1&0: –00 – A –01 – B –10 – C –11 - D
7
You may choose to use SW0-7 for the data bit Use pushbutton switch B to signal that data has arrived.
8
Dr. Hoganson CSIS 4381 Lab project continued Document your project in your lab notebook. Include a FSR diagram for 1011. Include a initial flowchart for your first design. Include a final flowchart of your program that works. We will use Wed of this week, and Monday of next week for lab time. Last class day is Wed December 11. Final exam is: ( 6:30pm MW classes) –December 16, 6:30pm-8:30pm
9
Dr. Hoganson CSIS 4381 High-Level Design Suggestions Start Next State Input Loop Display State Subroutine Get Input Push Button Pressed
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.