
EZ-USB FX2 Technical Reference Manual
Page 13-2 EZ-USB FX2 Technical Reference Manual v2.1
Each port is associated with a pair of registers:
• An OE
x
register (where
x
is A, B, C, D, or E), which sets the input/output direction of each
of the 8 pins (0 = input, 1 = output). See Figure 13-2.
• An IOx register (where x is A, B, C, D, or E). Values written to IOx appear on the pins
which are configured as outputs; values read from IOx indicate the states of the 8 pins,
regardless of input/output configuration. See Figure 13-3.
Most I/O pins have alternate functions which may be selected using configuration registers (see
Tables 13-1 through 13-9). Each alternate function is unidirectional; the FX2 “knows” whether the
function is an input or an output, so when an alternate configuration is selected for an I/O pin, the
corresponding OE
x
bit is ignored (see Figures 13-4 and 13-5).
The default (power-on reset) state of all I/O ports is:
• Alternate configurations off
• All I/O pins configured as inputs
Figure 13-1 shows the basic structure of an FX2 I/O pin.
Figure 13-1. FX2 I/O Pin
OEx Bit
IOx Bit
I/O Pin
Read
Write
Komentarze do niniejszej Instrukcji