Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years ago.
create a RC filter for nucleo
i need to write a program for nucleo that takes as input a signal from a waveform generator and filters it with a RC low pass filter. if someone could post me a solution to this problem, i'll be very gratefull :).
3 Answers
9 years ago.
Generally an RC filter is done in hardware. It's a Resistor and a Capacitor hence the name.
A quick google for c low pass filter found this: https://www.quora.com/Whats-the-C-coding-for-a-low-pass-filter the lowPassFrequency() function there is probably about what you want.
9 years ago.
As Andy says, an RC filter is a hardware construct. Do you need to build an RC filter or write a DSP filter?
9 years ago.
Quite simple implementation in C. This author has posted an excellent tutorial with C code. Post back if you have issues. I would highly recommend understanding the implementation prior to coding it up in C. I would implement it in Excel and look at how it works. http://www.edn.com/design/systems-design/4320010/A-simple-software-lowpass-filter-suits-embedded-system-applications
Here is an example of a LPF using FIR code.
https://developer.mbed.org/cookbook/FIR-Filter
posted by Martin Simpson 17 Dec 2015