Serial interface – Rainbow Electronics MAX7360 User Manual

Page 13

Advertising
background image

I

2

C-Interfaced Key-Switch Controller and LED

Driver/GPIOs with Integrated ESD Protection

MAX7360

______________________________________________________________________________________ 13

fade in automatically cancels that port’s fade and

immediately output at its newly programmed intensity.

4) Put the part into shutdown to cause all ports to fade

out. Changing an individual PWM intensity during

fade out automatically cancels that port’s fade and
immediately turns off.

Blink

Each port has its own blink control settings through

registers 0x58 to 0x5F (see Table 25 in the Register Tables

section). The blink period ranges from 0 (blink disabled)

to 4.096s. Settable blink duty cycles range from 6.25%

to 50%. All blink periods start at the same PWM cycle for

synchronized blinking between multiple ports.

GPIO Port Interrupts (INTI)

Three possible sources generate INTI: I

2

C timeout,

GPIOs configured as inputs, and the rotary switch

(registers 0x48, 0x49, and 0x4A). Read the respective

data/status registers for each type of interrupt to clear

INTI. Set register 0x46 for rotary switch-based interrupts.

Set registers 0x58 to 0x5F for individual GPI-based

interrupts. If multiple sources generate the interrupt, all

the related status registers must be read to clear INTI.

Rotary Switch

The MAX7360 can accept a 2-bit rotary switch inputs on

PORT6 and PORT7. Rotation of the switch in a clockwise

direction increments the count. Enable rotary switch

mode from the GPIO global configuration register (0x40).

Several settings for PORT6 and PORT7 occur during

rotary switch mode:
1) Each port has a 10FA pullup to V

CC

.

2) Register 0x46 sets the debounce time.
3) A debounced rising edge on PORT6 while PORT7 is

high decreases the count.

4) A debounced rising edge on PORT6 while PORT7 is

low increases the count.

For more details, see Figure 1.

Serial Interface

Figure 2 shows the 2-wire serial interface timing details.

Serial Addressing

The MAX7360 operates as a slave that sends and

receives data through an I

2

C-compatible 2-wire interface.

The interface uses a serial-data line (SDA) and a serial-

clock line (SCL) to achieve bidirectional communication

between master(s) and slave(s). A master (typically a

microcontroller) initiates all data transfers to and from the

MAX7360 and generates the SCL clock that synchronizes

the data transfer.
The MAX7360’s SDA line operates as both an input and

an open-drain output. A pullup resistor, typically 4.7kI,

Figure 2. 2-Wire Serial Interface Timing Details

SDA

SCL

t

HD, STA

t

LOW

t

HIGH

t

R

t

F

t

SU, DAT

t

SU, STA

t

SU, STO

t

BUF

t

HD, STA

t

HD, DAT

START

CONDITION

STOP

CONDITION

START

CONDITION

REPEATED

START CONDITION

t

F

t

F,TX

t

R

Figure 1. Rotary Switch Input Signal Timing

PORT7

PORT6

PORT7

PORT6

INCREMENT

DECREMENT

ROTARY SWITCH

DEBOUNCE

Advertising