**There are many times when developing code for some for instrument we only need a simple and quick way to filter raw ADC data captured by the micro-controller. In most cases this filtering is done to eliminate noise from the captured signal using a low-pass function and in other cases to block DC offsets from the signal using a high-pass filter function.**** **

**Although there are many filtering schemes and topologies available many of these require intensive amounts of number crunching, data memory and execution speed perhaps not available in a small 8- or 16-bit micro-controller. If your filtering requirement are not rigorous a simple single-pole filter may just fit the bill. Whether in the analog or digital world we find using these types of filters quite often. Over the years I have successfully used these types of simple signal filtering. There are numerous amounts of information and material on the web regarding this theme that you can easily google and get the answers. So, I will add one more source to such resources. I have included here a simple and brief description to the single pole low-pass filter function and its application. I have also included a download for an Excel file that I created that allows you to simulate both High-Pass and Low-Pass single pole recursive filter responses.**

**The above description does not get into the details of the High-Pass filter function, but it is almost identical except that it is the inverse function of the Low-Pass type.**

**The algorithm or time discrete recursive equation for the High-Pass filter function is shown below. **

**y(n) = a * y(n-1) + ( a * ( x(n) – x(n-1) ) ) **

**Where y(n) is the present calculated output value, x(n) the present sample value, x(n-1) the previous sample value and y(n-1) the previous output value.**