Document # 001-20559 Rev. *D
11
General Purpose IO (GPIO)
6.2.5
PRTxICx Registers
The Port Interrupt Control Registers (PRTxIC1 and
PRTxIC0) are used to specify the Interrupt mode for GPIO
pins.
Bits 7 to 0: Interrupt Control x[7:0].
In the PRTxICx reg-
isters, the Interrupt mode for the pin is determined by bits in
these two registers. These are referred to as IC1 and IC0, or
together as IC[1:0].
There are four possible interrupt modes for each port pin.
Two mode bits are required to select one of these modes
and these two bits are spread into two different registers
(PRTxIC0 and PRTxIC1). The bit position of the effected
port pin (for example, Pin[2] in Port 0) is the same as the bit
position of each of the interrupt control register bits that con-
trol the Interrupt mode for that pin (for example, bit[2] in
PRT0IC0 and bit[2] in PRT0IC1). The two bits from the two
registers are treated as a group.
The Interrupt mode must be set to one of the non-zero
modes listed in
, in order to get an interrupt from
the pin.
The GPIO Interrupt mode “disabled” (00b) disables inter-
rupts from the pin, even if the GPIO’s bit interrupt enable is
on (from the PRTxIE register).
Interrupt mode 01b means that the block asserts the inter-
rupt line (INTO) when the pin voltage is low, providing the
block’s bit interrupt enable line is set (high).
Interrupt mode 10b means that the block asserts the inter-
rupt line (INTO) when the pin voltage is high, providing the
block’s bit interrupt enable line is set (high).
Interrupt mode 11b means that the block asserts the inter-
rupt line (INTO) when the pin voltage is the opposite of the
last state read from the pin, providing the block’s bit interrupt
enable line is set high. This mode switches between low
mode and high mode, depending on the last value read from
the port during reads of the data register (PRTxDR). If the
last value read from the GPIO was ‘0’, the GPIO subse-
quently is in Interrupt High mode.
If the last value read from the GPIO was ‘1’, the GPIO then
is in Interrupt Low mode.
Figure 6-3. GPIO Interrupt Mode 11b
assumes that the GIE is set, GPIO interrupt mask
is set, and that the GPIO Interrupt mode is set to 11b. The
Change Interrupt mode is different from the other modes, in
that it relies on the value of the GPIO’s read latch to deter-
mine if the pin state has changed. Therefore, the port that
contains the GPIO in question must be read during every
interrupt service routine. If the port is not read, the Interrupt
mode acts as if it is in high mode when the latch value is ‘0’
and low mode when the latch value is ‘1’.
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
1,xxh
Interrupt Control 0[7:0]
RW : 00
1,xxh
Interrupt Control 1[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 Table of the Core Registers” on page 32
Table 6-2. GPIO Interrupt Modes
Interrupt Modes
Description
IC1
IC0
0
0
Bit interrupt disabled, INTO de-asserted
0
1
Assert INTO when PIN = low
1
0
Assert INTO when PIN = high
1
1
Assert INTO when PIN = change from last read
Last Value Read From Pin was ‘0’
Pin State Waveform
GPIO pin
interrupt
enable set
Interrupt
occurs
(a)
Pin State Waveform
GPIO pin
interrupt
enable set
Interrupt
occurs
(b)
Last Value Read From Pin was ‘1’
Pin State Waveform
GPIO pin
interrupt
enable set
Interrupt
occurs
(c)
Pin State Waveform
GPIO pin
interrupt
enable set
Interrupt
occurs
(d)
Summary of Contents for PSoC CY8C23533
Page 4: ...Contents Overview 4 Document 001 20559 Rev D Section G Glossary 385 Index 401 ...
Page 16: ...Contents Overview 16 Document 001 20559 Rev D ...
Page 24: ...24 Document 001 20559 Rev D Section A Overview ...
Page 30: ...30 Document 001 20559 Rev D Pin Information ...
Page 54: ...54 Document 001 20559 Rev D Supervisory ROM SROM ...
Page 60: ...60 Document 001 20559 Rev D RAM Paging ...
Page 68: ...68 Document 001 20559 Rev D Interrupt Controller ...
Page 76: ...12 Document 001 20559 Rev D General Purpose IO GPIO ...
Page 82: ...18 Document 001 20559 Rev D Internal Main Oscillator IMO ...
Page 84: ...20 Document 001 20559 Rev D Internal Low Speed Oscillator ILO ...
Page 90: ...26 Document 001 20559 Rev D External Crystal Oscillator ECO ...
Page 94: ...30 Document 001 20559 Rev D Phase Locked Loop PLL ...
Page 106: ...42 Document 001 20559 Rev D Sleep and Watchdog ...
Page 228: ...164 Document 001 20559 Rev D Section D Digital System ...
Page 234: ...170 Document 001 20559 Rev D Array Digital Interconnect ADI ...
Page 278: ...214 Document 001 20559 Rev D Digital Blocks ...
Page 296: ...232 Document 001 20559 Rev D Analog Interface ...
Page 304: ...240 Document 001 20559 Rev D Analog Array ...
Page 308: ...244 Document 001 20559 Rev D Analog Input Configuration ...
Page 312: ...248 Document 001 20559 Rev D Analog Reference ...
Page 338: ...274 Document 001 20559 Rev D Section F System Resources ...
Page 354: ...290 Document 001 20559 Rev D Multiply Accumulate MAC ...
Page 374: ...310 Document 001 20559 Rev D I2C ...
Page 400: ...336 Document 001 20559 Rev D Section G Glossary ...