I would question whether a PWM "technically" counts as digital... It is on and off, sure, but so is a mechanical power switch, which few would describe as digital. "Digital" is more when we get higher level values represented by multiple signals that are on or off (aka bits).
kragen|3 months ago
I agree that a PWM signal is not really a digital signal, but it's kind of on the edge—for example, https://tinyurl.com/25y54mph is a simulation I designed of a completely analog PWM generator (a simulated LM324 op-amp, five transistors, 13 resistors, and a couple of caps), and several vendors offer better-designed versions of the same thing on an IC, but you can also get a perfectly adequate PWM signal out of a digital GPIO pin, and the PWM peripherals commonly included in microcontrollers are entirely digital.