Datasheet

© 2008 Microchip Technology Inc. DS22103A-page 31
MCP23018/MCP23S18
1.7.6 INTERRUPT CONDITIONS
There are two possible configurations to 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. For example, an
interrupt occurs by an input changing from 1 to
0. The new initial state for the pin is a logic 0.
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
INTAP or GPIO is read.
See Figure 1-11 and Figure 1-12 for more information
on interrupt operations.
FIGURE 1-11: INTERRUPT-ON-PIN-
CHANGE
FIGURE 1-12: 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 GPIO
or INTCAP
DEFVAL
X X X X X 1 X X
GP2
76543210GP:
ACTIVE
ACTIVE
(INT clears only if interrupt
condition does not exist.)