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.
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.
Flip-flop types
Edge triggering, set and reset, the forbidden state and the toggle.
| Lesson | Time | What 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 |
|
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".
Counters
Synchronous counting, terminal count, a decade and eight bits.
| Lesson | Time | What 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 |
|
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".
Shift registers
Load, shift, serial in and a ring counter.
| Lesson | Time | What 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 |
|
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".
Moore and Mealy
Outputs from the state alone, or from the state and the input.
| Lesson | Time | What 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 |
|
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".
State encoding
Binary, Gray and one-hot, and what each one buys.
| Lesson | Time | What 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 |
|
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".
Hazards
Bouncing clocks, glitches, ripple and metastability.
| Lesson | Time | What 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 |
|
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".
Boss: a 74HC traffic light
A timer, a decoder and a latch, then your own timing.
| Lesson | Time | What 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 |
|
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".
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.