Oscium’s Logiscope Probes Embedded Traffic System Intersection


Blog_41p0_main_640x480

 

In the image above Oscium’s logic analyzer, Logiscope, and an iPad monitor numerous logic states in a micro controller implementation of a common traffic intersection. There are traffic lights in the model indicating travel for pedestrians, and cars traveling north and south, and cars traveling east and west. The finite state machine model is frequently used in programming as a basis for controlling a system with multiple inputs and outputs. Texas Instrument’s TM4C123G 64-pin Cortex M4 micro controller and LaunchPad evaluation board provide the programmable control for the system.

Simple Finite State Machines

A finite-state machine (FSM) is a model used to design computer programs and sequential logic circuits. Finite state machines are system models characterized by the following:

  • A particular FSM is defined by a list of its states and the triggering condition for each transition
  • The machine is in only one state at a time
  • The state it is in at any given time is called the current state
  • It can change from one state to another when initiated by a triggering event or condition
  • The next state and output of an FSM is a function of the input and of the current state.

Well Behaved Traffic Intersection System

Programmers use tools like logic analyzers to monitor the output states of embedded systems as the inputs change and trigger events prompt state transitions. The simple traffic intersection is an ideal conceptual model of a state machine because it’s something common where most people have firsthand knowledge. The light is green for only one direction at a time. The light sequence starts with green, then changes to yellow momentarily, and then changes to red while the light for traffic in the other direction begins the sequence, starting with green.

In the image below, the states of the Red, Yellow, and Green traffic lights are shown in the display of Oscium’s Logiscope logic analyzer. See if you can pick out these observations from Logiscope’s display:

  • the Green lights are never on at the same time
  • the pedestrian Walk light comes on steady while traffic has Red in both directions
  • the pedestrian light flashes twice before the steady “Don’t Walk” light come on and traffic flow resumes

IMG_Blog_41p0_screenshot

Traffic Intersection Malfunctioning

Imagine for a moment if the traffic lights at an intersection on your way home malfunctioned by allowing traffic to move in all directions at once. The north and south bound traffic would collide with the east and west bound traffic. Pedestrians would be left to fend for themselves. In the movie The Italian Job, the hacker genius uses the LA traffic control system to create escape routes for the members of his team by creating massive traffic jams. The system broke down by going into an undefined or disallowed state.

(Originally posted on June 17, 2014 on Oscium’s Blog – Re-posted with permission from our valued partner Oscium)

If you have any questions or would like more information on contact NorthTree Associates – sales@northtreeassociates.comhttp://www.northtreeassociates.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s