I'm trying to use Timer/Counter1 to generate an analog output signal. So I configured it as PWM and connected a RC filter. The output is on pin PB1.
On the same port (pin PB4) I have a LED (SMD 0805 with 470R in series) that flashes every 500ms. Incredibly I see a 500ms noise overimposed on the analog output voltage derived from PWM.
I already tried to move the flash on PD3 (another port), but it seems the problem is there.
I think the cause is the high level voltage on PWM output that decreases when the LED is on.
So the question is: how to decrease this side effect at the minimum?