Port manipulation and PWM


Does anyone know if the portmanipulation cmds messes up a pwm output???

for example:

analogWrite(5,100); PORTD = 0xF0;

Does this make the pwm signal of pin 5 different from 100?

And, would it mess up the serial communication?

Thanks in advance

I think as long as you leave the pin configured as an output, the PWM should continue. It might be disrupted temporarily when you write to the PORT though.