I wanted to experiment with the idea of making a DAC (Digital to Analog Converter), the method I have used in the past was to use a R-2R Ladder Network of Resistors. But having huge amounts of resistors all tightly tied together is quite a pain. So as an alternative Wikipedia suggests using PWM (Pulse Width Modulation) and a low-pass filter.
So with Limitz excellent knowledge of audio we set about creating a program to output a PWM signal from a serial port. We did that by bit-banging the DTR pin (pin 4). We pass the output signal through our low-pass filter which is simply a 12K ohm resistor and a 47 nF capictor.
Below is some photos of the result on my brand new Oscilloscope (OWON 6062T). I've also recorded a video of it running live although the quality suffers from a crappy camera phone.