4 ms·
Today I learned you can use generic GPIO PWM to fake an analog voltage. https://ww1.microchip.com/downloads/en/Appnotes/90003250A.pdf https://ww1.microchip.com
by imglorp 3mo ago
Today I learned you can use generic GPIO PWM to fake an analog voltage.
https://ww1.microchip.com/downloads/en/Appnotes/90003250A.pdf https://ww1.microchip.com/downloads/en/Appnotes/90003250A.pd...
- throwaway219450 3mo agoThis is also how Arduino emulates analog output, since most micros don’t have a hardware DAC https://docs.arduino.cc/language-reference/en/functions/analog-io/analogWrite/ https://docs.arduino.cc/language-reference/en/functions/anal...
- deleted 3mo ago[deleted]
- technothrasher 3mo agoWorking in process control, this is an everyday thing for me. But I prefer to use pulse frequency modulation, which is what a lot of dedicated DACs use.
- inigyou 3mo agoCongrats, you're one of today's lucky 10000! It's extremely common actually. I don't know if they're still doing it but Raspberry Pi 1,2,3 had only PWM audio output, not true analog. A PWM output followed by an adequate filter can be considered a cheap, low quality type of DAC. You never get the quality as good as you want but you get it good enough.