Projects / Ideas / PWM from a counter and comparator

PWM from a counter and comparator

IntermediateDigital LogicIdeaReviewed
In short

How do you build a PWM from a counter and comparator?

A free-running counter compared with a switch setting makes PWM, the way microcontrollers do it. You need 74HC193 up/down counter × 2, 74HC86 quad XOR gate × 2, NE555 Timer IC, DIP switch 8-position, LED 5 mm red, Resistor 330 Ω, Resistor 10 kΩ × 8, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

Level
Intermediate
Time
About 180 min
Parts
9
An idea, not a guided build yet. Goal, parts and steps; no wiring, code or tests. Copy it to My Garage to plan it.
Goal

Understand how hardware PWM works.

Parts list

How to build it

  1. Count continuously from a clock
  2. Compare the count with switch values
  3. Set the output while count is below
  4. Watch LED brightness change
  5. View duty cycle on a scope

Related projects

Common questions

What parts do I need for the PWM from a counter and comparator?

74HC193 up/down counter × 2, 74HC86 quad XOR gate × 2, NE555 Timer IC, DIP switch 8-position, LED 5 mm red, Resistor 330 Ω, Resistor 10 kΩ × 8, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the PWM from a counter and comparator take to build?

About 180 minutes for a intermediate maker.