AN2099 describes a topology for a single-pole infinite impulse response (IIR) filter. It includes equations and software to implement this topology; the associated example projects give the user access to filter routines in either assembly or C.
In many applications, you need to apply a post-processing digital filter on your data. A common example is the filtering of data from an ADC. This application note shows an IIR filter that can be constructed using the CPU (without any addition digital filtering hardware) and the equations necessary for calculating the roll-off frequency (f0). A comparison with the moving average FIR filter, which is commonly used for filtering digital data in a CPU, is also shown.