Microchip Technology GPIODM-KPLCD Data Sheet

Page of 48
© 2007 Microchip Technology Inc.
DS21952B-page 25
MCP23017/MCP23S17
1.7.5
INTERRUPT CONDITIONS
There are two possible configurations that cause
interrupts (configured via INTCON):
1.
Pins configured for interrupt-on-pin change
will cause an interrupt to occur if a pin changes
to the opposite state. The default state is reset
after an interrupt occurs and after clearing the
interrupt condition (i.e., after reading GPIO or
INTCAP). For example, an interrupt occurs by
an input changing from ‘1’ to ‘0’. The new initial
state for the pin is a logic 0 after the interrupt is
cleared.
2.
Pins configured for interrupt-on-change from
register value
 will cause an interrupt to occur if
the corresponding input pin differs from the
register bit. The interrupt condition will remain as
long as the condition exists, regardless if the
INTCAP or GPIO is read.
 an
 for more information on
interrupt operations.
FIGURE 1-6:
INTERRUPT-ON-PIN 
CHANGE
FIGURE 1-7:
INTERRUPT-ON-CHANGE 
FROM REGISTER 
DEFAULT
GPx
INT
ACTIVE
ACTIVE
Port value
is captured
into INTCAP
Read GPIO
or INTCAP
Port value
is captured
into INTCAP
INT
Port value
is captured
into INTCAP
Read GPIU
or INTCAP
DEFVAL REGISTER
X
X
X
X
X
0
X
X
GP2
7
6
5
4
3
2
1
0
GP:
ACTIVE
ACTIVE
(INT clears only if interrupt
condition does not exist.)
Pin
Pin