Presentation is loading. Please wait.

Presentation is loading. Please wait.

T-Bird Tail Light Control Circuit Design

Similar presentations


Presentation on theme: "T-Bird Tail Light Control Circuit Design"— Presentation transcript:

1 T-Bird Tail Light Control Circuit Design

2 T-Bird: Tail Light Control Circuit Design
Designing a state machine that controls the tail lights of a 1965 Ford Thunderbird. There are three lights on each side. They operate in sequence to show the turning direction. The state machine has two input signals LEFT and RIGHT. It also has an emergency flasher input HAZ causes all six lights flashing on and off together. We assume the existence of a free-running clock signal whose frequency equals the desired flashing rate for the lights.

3 T-bird left tail-lights example

4 T-bird right tail-lights example

5 T-bird flashing tail-lights example

6 T-bird flashing tail-lights example

7 Design using State diagrams
State diagrams are often used to design small to medium sized state machines. designing a state diagram is much like designing a state table. There is one fundamental difference between a state diagram and a state table, a difference that makes state-diagram design simpler but also more error prone: A state table is an exhaustive listing of the next states for each state/input combination. No ambiguity is possible. A state diagram contains a set of arcs labeled with transition expressions. There is no guarantee that the transition expressions written on the arcs leaving a particular state cover all the input combinations exactly once.

8 Different States We will design a Moore machine, so that the state alone determines which lights are on and which are off. For a left turn, the machine should cycle through four states in which the righthand lights are off and 0, 1, 2, or 3 of the lefthand lights are on. For a right turn, the machine should cycle through four states - it is the opposite of left turn. In hazard mode, only two states are required - all lights ON and all lights OFF.

9 State diagram Figure 7-62 shows the state diagram for the machine.
A common IDLE state is defined in which all of the lights are off. When a left turn is requested, the machine goes through three states in which 1, 2, and 3 of the lefthand lights are on, and then back to IDLE. Right turn works similarly. In the hazard mode, the machine cycles between the IDLE state and LR3 state in which all six lights are on.

10 Lighing sequence for T-bird tail lights

11 Initial state diagram for T-bird tail lights

12 output equations from the output table:
LA = L1 + L2 + L3 + LR3 RA = R1 + R2 + R3 + LR3 LB = L2 + L3 + LR3 RB = R2 + R3 + LR3 LC = L3 + LR3 RC = R3 + LR3

13 Ambiguous state diagram
There is one big problem with the state diagram of Figure it does not properly handle multiple inputs asserted simultaneously. For example, what happens in the IDLE state if both LEFT and HAZ are asserted? According to the state diagram, the machine goes to two states, LI and LR3, which is impossible. The problem is fixed in figure 7-63, where we have given the HAZ input priority. LEFT.HAZ’.RIGHT HAZ + LEFT.RIGHT Also we have treated LEFT and RIGHT asserted simultaneously as a hazard request, since the driver is clearly confused and needs help.

14 Corrected state diagram for T-bird tail lights

15 State-Machine is unambiguous
The new state diagram is unambiguous because the transition expressions on the arcs leaving each state are mutually exclusive and all-inclusive. That is, for each state, no two expressions are 1 for the same input combination, and some expression is 1 for every input combination.

16 Tweaking the state diagram
Once a left or right turn cycle begun, the state diagram in figure 7-63 allows the cycle to run to completion, even if HAZ is asserted. It would be safer for the car’s occupants to have the machine go into hazard mode as soon as possible. The state diagram is modified to provide this behaviour in figure 7-64.

17 Enhanced state diagram for T-bird tail lights
Inputs: LEFT, RIGHT, HAZ Outputs: Six lamps (function of state only

18 Finally ready to synthesize a circuit for the T-bird machine.
The state diagram has eight states, so we will need a minimum of three flip-flops to code the states. Obviously, many state assignments are possible, we will use the one in table 7-16 for the following reasons: 1. An initial (idle) state of 000 is compatible with most flip-flops and registers, which are easily initialized to the 0 state. 2. Two state variables, Q1 and Q0, are used to “count” in gray-code sequence for the left-turn cycle (IDLE  L1  L2  L3  IDLE ). This minimizes the number of state-variable changes per state transition, which can often simplify the excitation logic. 3. Because of the symmetry in the state diagram, the same sequence on Q1 and Q0 is used to “count” during a right-turn cycle, while Q2 is used to distinguish between left and right. 4. The remaining state-variable combination is used for the LR3 state.

19 State assignments

20 Transition list The next step is to write a sort of transition table.
Because the transitions in a state diagram are specified by expressions rather than by an exhaustive tabulation of next states. We will call the new format a transition list, because it has one row for each transition or arc in the state diagram. Both the named and coded versions of the current state and next state are shown. The named states are useful for reference purpose, while the coded states are used to develop transition equations. Once we have a transition list, the rest of the synthesis steps are pretty much “turning the crank”.

21 Transition list

22 Transition equations The first step in synthesizing a state machine from a transition list is to develop a set of transition equations that define each next-state variable V* in terms of the current state and input. A row’s transition product-term is the product of the current state’s minterm and the transition expression. Q2* = Q2’ . Q1’ . Q0 . (HAZ + RIGHT) + Q2’ . Q0 . (HAZ) + Q2 . Q0 Q1* = Q0 . HAZ’ Q0* = Q2’ . Q1’ . HAZ’ . (LEFT  RIGHT) + Q1’ . Q0 . HAZ’

23 Excitation equations If we use D flip-flops as the memory elements in our state machine then the excitation equations are easy to derive from the transition equations. Since the characteristic equation of a D flip-flop is Q* = D, the excitation equation for the corresponding D flip-flop will be the same as transition equations. if Qi* = Expression D = Expression D2 = Q2’ . Q1’ . Q0 . (HAZ + RIGHT) + Q2’ . Q0 . (HAZ) + Q2 . Q0 D1 = Q0 . HAZ’ D0 = Q2’ . Q1’ . HAZ’ . (LEFT  RIGHT) + Q1’ . Q0 . HAZ’


Download ppt "T-Bird Tail Light Control Circuit Design"

Similar presentations


Ads by Google