
MAX7304
10Maxim Integrated
I2C-Interfaced 16-Port,
Level-Translating GPIO and LED Driver
with High Level of Integrated ESD Protection
GPIO Values 1 and 2 Registers (0x3A, 0x3B)
The GPIO values 1 and 2 registers contain the debounced
input data for all the GPIOs for PORT7–PORT0 and
PORT15–PORT8, respectively (see Tables 13 and 14
in the Register Tables section). There is one debounce
period delay prior to detecting a transition on the input
port. This prevents a false interrupt from occurring when
changing a port from an output to an input. The GPIO
values 1 and 2 registers reports the state of all input ports
regardless of any interrupt mask settings.
When writing to the GPIO values 1 and 2 registers, the
corresponding PORT_ voltage is set high when written 1
or cleared when written 0. Reading the port when config-
ured as an output always returns the value 0 for the cor-
responding port regardless of the output value.
GPIO Level-Shifter Enable Register (0x3C)
Enabling bit D_ in this register enables the direct
level shifter between GPIO pins PORT15–PORT8 and
PORT7–PORT0 (see Table 15 in the Register Tables sec-
tion). The level-shifting pairs are PORT0/PORT8, PORT1/
PORT9, etc. The direction of the level shifter is con-
trolled by the GPIO direction 2 register (0x35). When the
corresponding bit in the GPIO direction 2 register is set
to 0, PORT15–PORT8 are inputs, while PORT7–PORT0
are outputs. When the bit is set to 1, PORT7–PORT0 are
inputs, while PORT15–PORT8 are outputs.
GPIO Global Configuration Register (0x40)
The GPIO global configuration register controls the main
settings for the GPIO ports (see Table 16 in the Register
Tables section).
Bit D5 enables interrupt generation for I2C timeouts. D4
is the main enable/shutdown bit for the GPIOs. Bit D3
functions as a software reset for the GPIO registers
(0x31 to 0x5B). Bits D[2:0] set the fade-in/out time for the
GPIOs configured as constant-current sinks.
GPIO Debounce Configuration Register (0x42)
The GPIO debounce configuration register sets the
amount of time a GPIO must be held in order for the
device to register a logic transition (see Table 17 in
the Register Tables section). Five bits (D[4:0]) set 32
possible debounce times from 9ms up to 40ms.
LED Constant-Current Setting Register (0x43)
The LED constant-current setting register sets the global
constant-current level (see Table 18 in the Register
Tables section). Bit D0 selects the global current values
between 10mA and 20mA. This setting only applies to the
LED driver enabled pins, PORT15–PORT12.
Common PWM Ratio Register (0x45)
The common PWM ratio register stores the common con-
stant-current output PWM duty cycle (see Table 19 in the
Register Tables section). The values stored in this register
translate over to a PWM ratio in the same manner as the
individual PWM ratio registers (0x50 to 0x53). Ports can use
their own individual PWM value or the common PWM value.
Write to this register to change the PWM ratio of several
ports at once.
I2
C Timeout Flag Register (0x48) (Read Only)
The I2C timeout flag register contains a single bit (D0),
which indicates if an I2C timeout has occurred (see Table
20 in the Register Tables section). Read this register to
clear an I2C timeout initiated interrupt.
PORT12–PORT15 Individual PWM Ratio
Registers (0x50 to 0x53)
Each LED driver port has an individual PWM ratio reg-
ister, 0x50 to 0x53 (see Table 21 in the Register Tables
section). Use values 0x00 to 0xFE in these registers to
configure the number of cycles out of 256 the output
sinks current (LED is on), from 0 cycles to 254 cycles.
Use 0xFF to have an output continuously sink current
(always on). For applications requiring multiple ports
to have the same intensity, program a particular port’s
configuration register (0x54 to 0x57) to use the common
PWM ratio register (0x45). New PWM settings take place
at the beginning of a PWM cycle, to allow changes from
common intensity to individual intensity with no interrup-
tion in the PWM cycle.
PORT12–PORT15 LED Configuration
Registers (0x54 to 0x57)
Registers 0x54 to 0x57 set individual configurations for
each port (see Table 22 in the Register Tables section).
D5 sets the port’s PWM setting to either the common or
individual PWM setting. Bits D[4:2] enable and set the
port’s individual blink period from 0 to 4096ms. Bits D1
and D0 set a port’s blink duty cycle.
Interrupt Mask 1 and 2 Registers (0x58, 0x59)
The interrupt mask 1 and 2 registers control which ports
trigger an interrupt for PORT7–PORT0 and PORT15–
PORT8, respectively (see Tables 23 and 24 in the
Register Tables section). Set the bit to 0 to enable the
interrupt. Set the bit to 1 to mask the interrupt.
If the port that has generated the interrupt is not masked,
the interrupt causes the INT signal to assert. A read of the
GPIO values 1 and 2 registers (0x3A, 0x3B) is required
to deassert the INT pin. Note that transitions that occur
while the INT signal is asserted, but before the read of