Lol. The secret of resistors is ohms law :P
But anyway. The output specifications you are quoting usually aren't taken in consideration when building little circuits on a breadboard.
Output/Input impedance and bandwidth can get somewhat technical, so to make quick calculations we can usually make a few assumptions:
1. Assume Input impedance in infinite and input capacitance 0.
2. Assume Output impedance is 0.
This allows us to tailor our own bandwidth (or rise time if you prefer) by adding some R and C to the circuit (i.e your 48khz requirement).
The cutoff frequency of a single-pole lowpass (one resistor, one cap) is 1/(2*pi*RC). Since resistors come in more values than capacitors, we should pick an appropriate capacitor value first (I like 1nF), and then calculate for resistance:
R = 1/(2*pi*(1nF)(48kHz)) = 3315 ohms, or 3.3k ohms
We got pretty lucky this time! Our values are almost exactly standard cap and resistance values. This won't always be the case however, and you might have to choose a different capacitance value to get close to a standard resistance value result.
This won't actually be the result (since we didn't take into account the output impedance of the mbed) but it should be close enough.
Oh, and it seems you're working on some audio application, in which case, your output filter cutoff frequency needs to be (at most) half of your sampling rate, so your resistance and capacitance should be 1nF and 6.8k. for a cut off frequency of 24kHz.
Hi,
As for the median, I do not like it either.
What I used in the past was just a very simple algoritme but effective that takes the average of two values if the value in between was off by a predefined percentage of full scale. It just filters spikes and not noise if the percentage is large enough.
So the data from the http://en.wikipedia.org/wiki/Median_filter sample would be preocessed like:
And as said before in my programs i would ALWAYS store 2,80,6,3 plus the percentage used to filter the spikes.