Build an improved, simpler finite state machine

Feb. 23, 1998
The two improvements suggested here pertain to the “Build a Simple Finite State Machine” Idea for Design submitted by Giovanni Romeo (ELECTRONIC DESIGN, July 7, 1997, p. 149). First of all, the schematic doesn’t show a register latch on...

The two improvements suggested here pertain to the “Build a Simple Finite State Machine” Idea for Design submitted by Giovanni Romeo (ELECTRONIC DESIGN, July 7, 1997, p. 149). First of all, the schematic doesn’t show a register latch on the EPROM inputs. The outputs of a 27C256 EPROM will exhibit glitches during transitions of the inputs. With the free-running clock shown in the schematic, the output register will occasionally catch these glitches. This causes state-machine failures if the inputs aren’t synchronized to the clock.

Secondly, there doesn’t seem to be much reason for this application to invent a state machine language as described in the text. The following C code implements the function described in the article (see the listing). The code is simpler to understand, and took less than an hour to write and debug. It was compiled under Borland C 3.1.

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!