12 Maxim Integrated
I2C-Interfaced Key-Switch Controller and LED
Driver/GPIOs with Integrated ESD Protection
MAX7360
GPIO Constant-Current Setting Register (0x43)
The GPIO constant-current setting register sets the global
constant-current amount (see Table 17 in the Register
Tables section). Bits D1 and D0 set the global current
values from 5mA up to 20mA.
GPIO Output Mode Register (0x44)
The GPIO output mode register sets an output as either
a constant-current or non-constant-current output for
PORT[7:0] (see Table 18 in the Register Tables section).
Outputs are configured as constant-current outputs by
default to prevent accidental loading of an LED across
an unregulated output. The constant-current circuits
automatically turn off when not in use to reduce current
consumption.
Common PWM Register (0x45)
The common PWM register stores the common constant-
current output PWM duty cycle (see Table 19 in the
Register Tables section). The values stored in this register
translate over to a PWM duty cycle in the same manner
as the individual PWM registers (0x50 to 0x57). Ports can
use their own individual PWM value, or the common PWM
value. Write to this register to change the duty cycle of
several ports at once.
Rotary Switch Configuration Register (0x46)
The rotary switch configuration register stores rotary
switch settings for PORT7 and PORT6 (see Table 20 in
the Register Tables section). D7 determines whether
switch counts or a time delay will trigger an interrupt
if enabled. D[6:4] set the count or time amount to wait
before sending an interrupt. Bits D[3:0] set the debounce
cycle time for the rotary switch inputs. Debounce time
ranges from 0 to 15ms.
I2C 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
21 in the Register Tables section). Read this register to
clear an I2C timeout initiated interrupt.
GPIO Input Register (0x49) (Read Only)
The GPIO input register contains the input data for all of
the GPIOs (see Table 22 in the Register Tables section).
Ports configured as outputs are read as high. 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 input register reports the state of all
input ports regardless of any interrupt mask settings.
Ports configured as an input have a 2FA internal pullup
to VCC for PORT[5:0] and a 10FA internal pullup to VCC
for PORT[7:6].
Rotary Switch Count Register (0x4A) (Read Only)
The MAX7360 keeps a count of the rotary switch rotations
in two’s compliment format (see Table 23 in the Register
Tables section). The register values wrap around as the
count value switches from a positive to a negative value
and back again. The count resets to zero after an I2C
read to this register.
PORT0–PORT7 Individual PWM Ratio Registers
(0x50 to 0x57)
Each port has an individual PWM ratio register (0x50 to
0x57, see Table 24 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 (0x58 to 0x5F) to use the common PWM 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 interruption in the PWM cycle.
PORT0–PORT7 Configuration Registers
(0x58 to 0x5F)
Registers 0x58 to 0x5F set individual configurations for
each port (see Table 25 in the Register Tables section).
Bits D7 and D6 determine the interrupt settings for the
inputs. Interrupts can assert upon detection of a logic
transition, a rising edge, or not at all. D5 sets the port’s
PWM setting to either the common or individual PWM
setting. Bits D[4:2] enable and set the ports’ individual
blink period from 0 to 4096ms. Bits D1 and D0 set a
port’s blink duty cycle.
Fading
Set the fade cycle time in the GPIO global configuration
register (0x40) to a non-zero value to enable fade in/out (see
Table 14 in the Register Tables section). Fade in increases
an LED’s PWM intensity in 16 even steps from zero to its
stored value. Fade out decreases an LED’s PWM intensity in
16 even steps from its current value to zero. Fading occurs
automatically in any of the following scenarios:
1) Change the common PWM register value from any
value to zero to cause all ports using the common
PWM register settings to fade out. No ports using
individual PWM settings are affected.
2) Change the common PWM register value to any
value from zero to cause all ports using the common
PWM register settings to fade in. No ports using indi-
vidual PWM settings are affected.
3) Put the part out of shutdown to cause all ports to fade
in. Changing an individual PWM intensity during fade