top | item 45832275

(no title)

jesperwe | 3 months ago

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).

discuss

order

kragen|3 months ago

A mechanical power switch can certainly be digital; the Harvard Mark I digital computer was made entirely out of mechanical power switches, actuated by solenoids (so-called "relays"). It depends on how you use it—as you say, by combining multiple different bits, either simultaneously or serially.

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.