Timer0 & Port D at the same time


I’m using an atmega328p. If I am using timer0 can I also use the other Port D outputs that aren’t the timer0 outputs?

Timer0 outputs ar on the same pins as PD5(11) and PD6(12). Can I still use PD1-4 and PD7 as outputs?

If so, do i need to define PD5 and PD6 as output or does enabling the timer0 effectively remove then from PortD?


Yes you can.

Yes you can.

You can use pinMode to declare the other pins as inputs or outputs as needed.