27.4.2.1 I/O Pin Configuration

The I/O pins of the device are controlled by the PORT peripheral registers. Each port pin has a corresponding bit in the Data Direction (DIR) and Data Output Value (OUT) registers to configure it as an input or output, and to control the output or pull state.

The Pin Configuration register (PINCFG[n]) is used for additional I/O pin configuration. A pin can be set to a totem-pole or pull configuration.

Since pull configuration is done through the PINCFG[n] register, all intermediate PORT states during switching of the pin direction and pin values are avoided.

The I/O pin configurations summarized in the following table are described in detail in this chapter.

Table 27-2. Pin Configurations Summary
DIRINENPULLENOUTConfiguration
000XAll digital disabled
010XInput without pull
0111Input with pull-up
0011Pull-up output; input buffer disabled
10XXDrive output; input buffer disabled
11XXDrive output; input buffer enabled