Skip to main content

Microcontrollers

Exercises 5.5 Practice Problems

3.

What is the difference between PORTC = 0x00 and DDRC = 0x00?
Answer.
PORTC = 0x00 sets the output value of all pins on Port C to be equal to logic LOW. DDRC = 0x00 sets the directionality of all pins on Port C to be input pins.