D/A converter exercises
Emulate a filtered PWM signal
Write a timer interrupt service routine that can generate a software filtered PWM signal using one of the DACs. The interrupt service routine should generate a digital PWM signal and apply a simple digital low pass filter to output a filtered version of the signal using the DAC. Use the following IIR filter algorithm: y = y + (x-y)/8, where x is the digital PWM signal and y is the filtered version.