76
CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
General Purpose I/O (GPIO)
6.2
Register Definitions
The following registers are associated with the General Purpose I/O (GPIO) and are listed in address order. The register
descriptions in this section have an associated register table showing the bit structure for that register. For a complete table of
GPIO registers, refer to the
“Summary Table of the Core Registers” on page 36
.
For a selected GPIO block, the individual registers are addressed in the
Summary Table of the Core Registers
. In the register
names, the ‘x’ is the port number, configured at the PSoC device level (x = 0 to 7 typically). All register values are readable,
except for the PRTxDR register; reads of this register return the pin state instead of the register bit state.
6.2.1
PRTxDR Registers
The Port Data Register (PRTxDR) allows for write or read
access of the current logical equivalent of the voltage on the
pin.
Bits 7 to 0: Data[7:0].
Writing the PRTxDR register bits set
the output drive state for the pin to high (for DR = 1) or low
(DR = 0), unless a bypass mode is selected (either I
2
C
Enable = 1 or the global select register written high).
Reading the PRTxDR register returns the actual pin state,
as seen by the input buffer. This may not be the same as the
expected output state, if the load pulls the pin more strongly
than the pin’s configured output drive. See
for a detailed discussion of digital I/O.
For additional information, refer to the
.
6.2.2
PRTxIE Registers
The Port Interrupt Enable Register (PRTxIE) is used to
enable/disable the interrupt enable internal to the GPIO
block.
Bits 7 to 0: Interrupt Enables[7:0].
A ‘1’ enables the INTO
output at the block and a ‘0’ disables INTO so it is only High-Z.
For additional information, refer to the
.
6.2.3
PRTxGS Registers
The Port Global Select Register (PRTxGS) is used to select
the block for connection to global inputs or outputs.
Bits 7 to 0: Global Select[7:0].
Writing this register high
enables the global bypass (BYP = 1 in
). If the
Drive mode is set to digital High-Z (DM[2:0] = 010b), then
the pin is selected for global input (PIN drives to the Global
Input Bus). In non-High-Z modes, the block is selected for
global output (the Global Output Bus drives to PIN), bypass-
ing the data register value (assuming I
2
C Enable = 0).
If the PRTxGS register is written to zero, the global in/out
function is disabled for the pin and the pin reflects the value
of PRT_DR.
For additional information, refer to the
.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,xxh
Data[7:0]
RW : 00
LEGEND
xx An “x” after the comma in the address field indicates that there are multiple instances of the register. For an expanded address listing of these registers,
refer to the
“Core Register Summary” on page 36
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,xxh
Interrupt Enables[7:0]
RW : 00
LEGEND
xx An “x” after the comma in the address field indicates that there are multiple instances of the register. For an expanded address listing of these registers,
refer to the
“Core Register Summary” on page 36
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,xxh
Global Select[7:0]
RW : 00
LEGEND
xx An “x” after the comma in the address field indicates that there are multiple instances of the register. For an expanded address listing of these registers,
refer to the
Summary of Contents for CY8C28 series
Page 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Page 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Page 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Page 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...