ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

Patterns in Numbers


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

PATTERNS IN NUMBERS

Technically Speaking A State Machine Design for Binary Pattern Recognition

by James Antonakos

Start ý The Problem ý Enumeration ý State Diagram Approach ý A Little Synchronous Logic ý State Transition Table ý Let Karnaugh Maps Find the Patterns ý A Hotshot One-Shot ý The Real Thing ý Other Implementations ý I Challenge Youý ý Sources and PDF

OTHER IMPLEMENTATIONS

State machines also can be implemented in software using a few lines of C code. You can see this in Listing 1, where states is a two-dimensional array containing the state transition values.

next = 0;
input = inputStream[0];
currentState = 0;
do
{
nextState = states[currentState][input];
.
.
.
currentState = nextState;
input = inputStream[next++];
} while(next < strlen(inputStream));
.

Listing 1ýHere you can see a C code sample used to simulate state machine operation.

Even a combination of hardware and software could be used, such as the BASIC Stamp. A short BASIC program could sample two digital inputs and control an output bit to indicate an even division.

PREVIOUSNEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ýCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ