Data Direction
| Bit7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DIR[7:0] | |||||||
| AccessR/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W |
| Reset0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Data Direction
Writing a ‘1’ to PORTx.DIR[n] configures and enables pin n as an output pin.
Writing a ‘0’ to PORTx.DIR[n] configures pin n as an input-only pin. Its properties can be configured by writing to the ISC bit in PORTx.PINnCTRL.
PORTx.DIRn controls only the output enable. Setting PORTx.DIR[n] to ‘1’ does not disable the pin input.