![](http://datasheet.mmic.net.cn/Maxim-Integrated-Products/MAX7319ATE-_datasheet_98549/MAX7319ATE-_8.png)
MAX7319
A long read sequence (more than 2 bytes) can be used
to poll the expander continuously without the overhead
of resending the slave address. If more than 2 bytes
are read from the expander, the expander repeatedly
returns the input port data followed by the transition
flags. The inputs are repeatedly resampled and the
transition flags repeatedly reset for each pair of bytes
read. All changes that occur during a long read sequence
are detected and reported.
The MAX7319 includes an 8-bit interrupt mask register
that selects which inputs generate an interrupt upon
change. Each input’s transition flag is set when its input
changes, independent of the interrupt mask register
settings. The interrupt mask register allows the proces-
sor to be interrupted for critical events, while the inputs
and the transition flags can be polled periodically to
detect less critical events.
The INT logic ensures that unnecessary interrupts are
not asserted, yet data transitions are detected and
reported regardless of when the transition occurs. The
INT output is not reasserted during a read sequence to
avoid recursive reentry into an interrupt service routine.
If transition occurs during read sequence, the INT
assertion is delayed until the STOP condition, however,
INT is not reasserted upon a STOP condition if the
changed input data is read before the STOP occurs.
Transition-Detection Masks
The transition-detection logic incorporates a transition
flag and an interrupt mask bit for each input port. The
eight change flags can be read through the serial inter-
face, and the 8-bit interrupt mask is set through the ser-
ial interface.
Each port’s transition flag is set when that port’s input
changes, and the transition flag remains set even if the
input returns to its original state. The port’s interrupt
mask determines whether a transition on that input port
generates an interrupt. Enable interrupts for high-priori-
ty inputs using the interrupt mask. The interrupt allows
the system to respond quickly to changes on these
inputs. Poll the MAX7319 periodically to monitor less-
important inputs. The transition flags indicate whether a
permanent or transient change has occurred on any
input since the MAX7319 was last accessed.
Serial Interface
Serial Addressing
The MAX7319 operates as a slave that sends and
receives data through an I2C interface. The interface
uses a serial data line (SDA) and a serial clock line (SCL)
to achieve bidirectional communication between mas-
ter(s) and slave(s). The master initiates all data transfers
to and from the MAX7319 and generates the SCL clock
that synchronizes the data transfer (Figure 1).
I2C Port Expander with Eight Inputs and
Maskable Transition Detection
8
_______________________________________________________________________________________
PIN CONNECTION
DEVICE ADDRESS
40k
Ω INPUT PULLUP ENABLED
AD2
AD0
A6
A5
A4
A3
A2
A1
A0
I7
I6
I5
I4
I3
I2
I1
I0
SCL
GND
1
100
000
Y
—
SCL
V+
1
100
001
Y
SCL
1
0
1
0
Y
SCL
SDA
1
0
1
Y
SDA
GND
1
100
Y
—
SDA
V+
1
100
101
Y
SDA
SCL
1
0
1
0
Y
SDA
1
0
1
Y
GND
1
0
1
0
—
GND
V+
1
101
001
—
Y
GND
SCL
1
101
010
—
Y
GND
SDA
1
101
011
—
Y
V+
GND
1
101
100
Y
—
V+
1
101
Y
V+
SCL
1
101
110
Y
V+
SDA
1
101
111
Y
Table 3. MAX7319 Address Map