I use a 12v DC motor. PWM 16khz, I want to know if someone has some code for filtering noise out of the ADC from the BEMF input. I have the code for PDFF/PID which is ok. But becuase of the interference from the motor which gets introduced into the input of the ADC I am looking for some clever softare that can filter this. I do have some clean up filtering hardware before the BEMF is inputed into the ADC. But Since the motor type can change I would like some code to control the rest of the filtering though software. Does anyone know how to do that ?