Lesson plan

Sequential logic design lesson plan

Circuits with memory, from real 74HC chips: flip-flops, synchronous counters, shift registers, Moore and Mealy machines, state encoding and hazards. Ends with a traffic light timed and decoded in hardware.

7 chapters, 7 lessons, about 6 hours, no board. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Edge triggering, set and reset, the forbidden state and the toggle.
  • Synchronous counting, terminal count, a decade and eight bits.
  • Load, shift, serial in and a ring counter.
  • Outputs from the state alone, or from the state and the input.
  • Binary, Gray and one-hot, and what each one buys.
  • Bouncing clocks, glitches, ripple and metastability.
  • A timer, a decoder and a latch, then your own timing.

Materials for the whole unit

  • 74HC00 quad NAND
  • 74HC04 hex inverter
  • 74HC08 quad AND
  • 74HC14 Schmitt inverter
  • 74HC161 4-bit counter x 2
  • 74HC194 universal shift register
  • 74HC74 dual flip-flop
  • 74HC86 quad XOR
  • Capacitor
  • Clock
  • LED x 7
  • Pushbutton x 3
  • Resistor x 7
  • Slide switch x 3
  • Traffic light module

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 55 min

Flip-flop types

Edge triggering, set and reset, the forbidden state and the toggle.

LessonTimeWhat students do
Flip-flop typesHalf a 74HC74: a D flip-flop that samples on the clock edge and holds, asynchronous set and reset, the forbidden state, and the toggle flip-flop that is half of every counter.55 min
  1. Run it: D on the edge
  2. It holds
  3. Set without a clock
  4. The forbidden state
  5. Build a toggle
  6. Divide by two

Materials

  • 74HC04 hex inverter
  • 74HC74 dual flip-flop
  • LED x 2
  • Pushbutton x 3
  • Resistor x 5
  • Slide switch

Check for understanding

Each student finishes "Flip-flop types" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Divide by two".

Chapter 2. About 1 h 5 min

Counters

Synchronous counting, terminal count, a decade and eight bits.

LessonTimeWhat students do
CountersThe 74HC161 synchronous counter: binary on four outputs, terminal count, wrapping at 16, a decade counter from one NAND gate, and a second chip cascaded for eight bits.65 min
  1. Run it: count
  2. Terminal count
  3. It wraps
  4. A decade counter
  5. Zero to nine
  6. Cascade a second chip
  7. Eight bits

Materials

  • 74HC00 quad NAND
  • 74HC161 4-bit counter x 2
  • Clock
  • LED x 5
  • Resistor x 5

Check for understanding

Each student finishes "Counters" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Eight bits".

Chapter 3. About 55 min

Shift registers

Load, shift, serial in and a ring counter.

LessonTimeWhat students do
Shift registersThe 74HC194 universal shift register: parallel load, shift right, serial data in, and a ring counter made by feeding the last stage back to the first.55 min
  1. Run it: parallel load
  2. Shift right
  3. Serial data in
  4. Close the ring
  5. Walk the 1
  6. Round again

Materials

  • 74HC194 universal shift register
  • LED x 4
  • Pushbutton
  • Resistor x 5
  • Slide switch x 3

Check for understanding

Each student finishes "Shift registers" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Round again".

Chapter 4. About 45 min

Moore and Mealy

Outputs from the state alone, or from the state and the input.

LessonTimeWhat students do
Moore and MealyOne button, two flip-flops, two outputs: a Moore machine that answers on the next clock and lasts one clock, and a Mealy machine that answers at once and depends on the input itself.45 min
  1. Run it: Mealy answers now
  2. Moore waits for the clock
  3. Mealy ends at the edge
  4. Moore lasts one clock
  5. A tap between clocks

Materials

  • 74HC04 hex inverter
  • 74HC08 quad AND
  • 74HC74 dual flip-flop
  • Clock
  • LED x 2
  • Pushbutton
  • Resistor x 3

Check for understanding

Each student finishes "Moore and Mealy" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A tap between clocks".

Chapter 5. About 45 min

State encoding

Binary, Gray and one-hot, and what each one buys.

LessonTimeWhat students do
State encodingThe same states, three ways to store them: binary in four flip-flops, Gray code where one bit changes at a time, and one-hot where every state has its own flip-flop.45 min
  1. Run it: binary
  2. Gray code
  3. One bit at a time
  4. One-hot
  5. Why spend the flip-flops

Materials

  • 74HC161 4-bit counter
  • 74HC194 universal shift register
  • 74HC86 quad XOR
  • Clock
  • LED x 7
  • Resistor x 7
  • Slide switch

Check for understanding

Each student finishes "State encoding" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Why spend the flip-flops".

Chapter 6. About 35 min

Hazards

Bouncing clocks, glitches, ripple and metastability.

LessonTimeWhat students do
HazardsA counter clocked by a real push button counts a dozen for one press. Debounce it with an RC filter and a Schmitt trigger, and meet the other hazards of sequential logic: glitches, ripple and metastability.35 min
  1. Run it: one press, many counts
  2. Wire the debouncer
  3. One press, one count
  4. Three presses, three counts

Materials

  • 74HC14 Schmitt inverter
  • 74HC161 4-bit counter
  • Capacitor
  • Pushbutton
  • Resistor x 2

Check for understanding

Each student finishes "Hazards" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Three presses, three counts".

Chapter 7. About 1 h 5 min

Boss: a 74HC traffic light

A timer, a decoder and a latch, then your own timing.

LessonTimeWhat students do
Boss: a 74HC traffic lightA traffic light with no processor: a 74HC161 is the timer, a 74HC04 and a 74HC08 decode its count into green, yellow and red, and a 74HC74 latches the WALK button. Finish the decode, prove a full cycle, then retime it.65 min
  1. Run it: green, then dark
  2. Half the cycle is missing
  3. Decode yellow
  4. Decode red
  5. A full cycle
  6. Latch the WALK button
  7. Make it yours: retime it

Materials

  • 74HC04 hex inverter
  • 74HC08 quad AND
  • 74HC161 4-bit counter
  • 74HC74 dual flip-flop
  • Clock
  • Pushbutton
  • Resistor
  • Traffic light module

Check for understanding

Each student finishes "Boss: a 74HC traffic light" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it yours: retime it".

Your class

Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.