
Chapter 13. Input/Output Page 13-5
13.3 I/O Port Alternate Functions
Each I/O pin may be configured for an alternate (i.e., non-general-purpose I/O) function. These
alternate functions are selected through various configuration registers, as described in the follow-
ing sections.
The I/O-pin logic for alternate-function outputs is slightly different than for alternate-function inputs,
as shown in Figures 13-4 (output) and 13-5 (input).
Figure 13-4. I/O-Pin Logic when Alternate Function is an OUTPUT
Figure 13-4 shows an I/O pin whose alternate function is always an output.
In Figure 13-4a, the I/O pin is configured for general-purpose I/O. In this configuration, the alter-
nate function is disconnected and the pin functions normally.
In Figure 13-4b, the I/O pin is configured as an alternate-function output. In this configuration, the
IOx/OEx output buffer is disconnected from the I/O pin, so writes to IOx and OEx have no effect on
the I/O pin. Reads from IOx, however, continue to work normally; the state of the I/O pin (and,
therefore, the state of the alternate function) is always available.
OEx Bit
IOx Bit
I/O Pin
Read
Write
Alternate Function
(Output)
OEx Bit
IOx Bit
I/O Pin
Read
Write
Alternate Function
(Output)
a) General-Purpose I/O Configuration b) Alternate-Function Configuration
Comentarios a estos manuales