Many simple MCUs do not provide DACs despite having PWM output. For low clock frequencies like 8MHz, PWM does provide very poor quality if used for audio purposes. E.g., TI mentions in application notes that 32kHz PWM with 8 bit timing resolution would result in an analog signal quality compared to 4-5 bit resolution DAC.
I wonder if one would be better off using UART TX at the highest possible baud rate - e.g. some MCUs would push out up to 400kBit/s at 16MHz.
Compared to the PWM method with its 8 or 16 MHz time base, we have only 400kHz timing resolution for each bit, but on the other hand, we may do far more level switchings in some given interval.
32kHz PWM does 64k switches per second with an 16Mhz timing resolution.
400kBaud UART allows for 400k switches per second with 400k timing resolution.
If we convert 50k samples per second to 50k 8-bit dithering patterns, what effective audio signal quality can be expected?