145
8331B–AVR–03/12
Atmel AVR XMEGA AU
The pin n configuration (PINnCTRL) register is used for additional I/O pin configuration. A pin
can be set in a totem-pole, wired-AND, or wired-OR configuration. It is also possible to enable
inverted input and output for a pin.
A totem-pole output has four possible pull configurations: totem-pole (push-pull), pull-down, pull-
up, and bus-keeper. The bus-keeper is active in both directions. This is to avoid oscillation when
disabling the output. The totem-pole configurations with pull-up and pull-down have active resis-
tors only when the pin is set as input. This feature eliminates unnecessary power consumption.
For wired-AND and wired-OR configuration, the optional pull-up and pull-down resistors are
active in both input and output directions.
Since pull configuration is configured through the pin configuration register, all intermediate port
states during switching of the pin direction and pin values are avoided.
The I/O pin configurations are summarized with simplified schematics in
13.3.1
Totem-pole
In the totem-pole (push-pull) configuration, the pin is driven low or high according to the corre-
sponding bit setting in the OUT register. In this configuration, there is no current limitation for
sink or source other than what the pin is capable of. If the pin is configured for input, the pin will
float if no external pull resistor is connected.
Figure 13-2.
I/O pin configuration - Totem-pole (push-pull).
13.3.1.1
Totem-pole with Pull-down
In this mode, the configuration is the same as for totem-pole mode, expect the pin is configured
with an internal pull-down resistor when set as input.
Figure 13-3.
I/O pin configuration - Totem-pole with pull-down (on input).
INn
OUTn
DIRn
Pn
INn
OUTn
DIRn
Pn