Data Direction

Name:
DIR
Offset:
0x00
Reset:
0x00
Access:
-
Bit76543210
DIR[7:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset00000000

Bits 7:0 – DIR[7:0]: Data Direction

Data Direction

This bit field controls output enable for the individual pins of the Port.

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.