Using FIR Filter in a PWM code

Try searching the web for FIR filters.