|
CY7C63411 Datasheet, PDF (18/36 Pages) Cypress Semiconductor – Low-speed USB Peripheral Controller | |||
|
◁ |
FOR
CY7C63411/12/13
FOR
CY7C63511/12/13
CY7C63612/13
9.2 GPIO Configuration Port
Every GPIO port can be programmed as inputs with internal pull-ups, open drain outputs, and traditional CMOS outputs. In ad-
dition, the interrupt polarity for each port can be programmed. With positive interrupt polarity, a rising edge (â0â to â1â) on an input
pin causes an interrupt. With negative polarity, a falling edge (â1â to â0â) on an input pin causes an interrupt. As shown in the table
below, when a GPIO port is configured with CMOS outputs, interrupts from that port are disabled. The GPIO Configuration Port
register provides two bits per port to program these features. The possible port configurations are:
Port Configuration bits
11
10
10
01
00
Pin Interrupt Bit
X
0
1
X
X
Driver Mode
Resistive
CMOS Output
Open Drain
Open Drain
Open Drain
Interrupt Polarity
-
disabled
disabled
-
+ (default)
In âResistiveâ mode, a 7-k⦠pull-up resistor is conditionally enabled for all pins of a GPIO port. The resistor is enabled for any pin
that has been written as a â1.â The resistor is disabled on any pin that has been written as a â0.â An I/O pin will be driven high
through a 7-k⦠pull-up resistor when a â1â has been written to the pin. Or the output pin will be driven LOW, with the pull-up dis-
abled, when a â0â has been written to the pin. An I/O pin that has been written as a â1â can be used as an input pin with an inte-
grated 7-k⦠pull-up resistor. Resistive mode selects a negative (falling edge) interrupt polarity on all pins that have the GPIO
interrupt enabled.
In âCMOSâ mode, all pins of the GPIO port are outputs that are actively driven. The current source and sink capacity are roughly
the same (symmetric output drive). A CMOS port is not a possible source for interrupts.
A port configured in CMOS mode has interrupt generation disabled, yet the interrupt mask bits serve to control port direction. If
a portâs associated Interrupt Mask bits are cleared, those port bits are strictly outputs. If the Interrupt Mask bits are set then those
bits will be open drain inputs. As open drain inputs, if their data output values are â1â those port pins will be CMOS inputs (HIGH
Z output).
In âOpen Drainâ mode the internal pull-up resistor and CMOS driver (HIGH) are both disabled. An I/O pin that has been written
as a â1â can be used as either a high-impedance input or a three-state output. An I/O pin that has been written as a â0â will drive
the output LOW. The interrupt polarity for an open drain GPIO port can be selected as either positive (rising edge) or negative
(falling edge).
During reset, all of the bits in the GPIO Configuration Register are written with â0.â This selects the default configuration: Open
Drain output, positive interrupt polarity for all GPIO ports.
7
Port 3
Config Bit 1
6
Port 3
Config Bit 0
5
Port 2
Config Bit 1
4
Port 2
Config Bit 0
3
Port 1
Config Bit 1
2
Port 1
Config Bit 0
1
Port 0
Config Bit 1
0
Port 0
Config Bit 0
Document #: 38-08027 Rev. **
Page 18 of 36
|
▷ |