Display Different LED Sequences Using the MAXQ2000 Microcontroller with the MAX6970 LED Driver

By:  Kien Mach

Abstract: This note shows an application circuit and provides all the firmware required to interface the MAXQ2000 microcontroller evaluation (EV) kit to the MAX6970, an 8-port, 36V constant-current LED driver. Included in this application note are schematics and microcontroller firmware. The example C program was written and assembled for the MAXQ® microcontroller with the IAR Embedded Workbench®.


The MAX6970 is an 8-port, 36V constant-current LED driver that uses a 4-wire serial interface. Using this application note, the MAX6970 can be used with the MAXQ2000 16-bit RISC microcontroller to create a variety of simple LED sequences with the touch of a button.

Hardware Setup

The circuit discussed in this application note utilizes the MAX6970EVKIT and the MAXQ2000-KIT. The MAX6970 evaluation (EV) kit schematic is shown in Figure 1. A MAXQ2000 EV kit board is included in the MAX6970 EV kit design. However for this application, it will be detached from the on-board MAXQ2000, since the MAXQ2000 EV kit has pushbutton features that would otherwise be used to control the LED sequences.

Figure 1. MAX6970EVKIT schematic.
Figure 1. MAX6970EVKIT schematic.

Remove the shunts from jumpers JU1–JU5. The system is configured by connecting pin 2 of JU1–JU5 (which corresponds to DIN, CLK, LE, DOUT, and active-low OE) of the MAX6970 EV kit board to the MAXQ2000 EV kit board (Figure 2). Move the shunt on jumper JU14 to the 2–3 position and apply a 3.3V supply to the VCC pad of the MAX6970 EV kit. Before turning on the power supply, ensure that the grounds from the MAXQ2000 and MAX6970 EV kits are connected together. All other jumpers on the MAX6970 EV kit should remain in their default positions of 1–2. Figure 3 shows the actual setup between the MAXQ2000 and MAX6970 EV kits.

Figure 2. Hardware configuration block diagram.
Figure 2. Hardware configuration block diagram.

Figure 3. MAXQ2000 EV kit and MAX6970 EV kit setup.
More detailed image
(PDF, 1.75MB)
Figure 3. MAXQ2000 EV kit and MAX6970 EV kit setup.

Displaying an LED Sequence

The MAXQ2000 EV kit has a pushbutton (SW5), which will be used to select the LED sequence. Push down on the button for approximately 500ms and the first sequence of LEDs will turn on. The program consists of five different LED sequences, as shown in Table 1. Each bit of the 8-bit data sent to the slave corresponds to a LED on the MAX6970 EV kit. When the pushbutton count is 1, the sequence 0x55 will turn on for 250ms, alternate to 0xAA, and light up for 250ms. This sequence will repeat itself until the next time that SW5 is pressed. If SW5 is pressed during push count 5, then the next sequence will return to push count 1.

Table 1. Pushbutton Sequence Order
Push Count Sequence
1 0x55, 0xAA
2 0xFF, 0x00
3 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80
4 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01
5 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF

Firmware Overview

The example MAXQ IAR Workbench C program files initialize the MAX2000 serial interface to communicate with the MAX6970. The serial interface clock is 8MHz when the system clock of the MAXQ2000 is 16MHz.

IAR and IAR Embedded Workbench are registered trademarks of IAR Systems AB.

MAXQ is a registered trademark of Maxim Integrated Products, Inc.

Related Parts
MAX6970 8-Port, 36V Constant-Current LED Driver Samples  
MAXQ2000 Low-Power LCD Microcontroller  

Next Steps
EE-Mail Subscribe to EE-Mail and receive automatic notice of new documents in your areas of interest.
Download Download, PDF Format (133kB)  

© Mar 23, 2009, Maxim Integrated Products, Inc.
The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.

APP 4379: Mar 23, 2009
REFERENCE SCHEMATIC 4379, AN4379, AN 4379, APP4379, Appnote4379, Appnote 4379