采用MAXQ2000微控制器和MAX6970 LED驱动器显

采用MAXQ2000微控制器和MAX6970 LED驱动器显,第1张

采用MAXQ2000微控制器和MAX6970 LED驱动器显示不同的LED排序

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®.

Overview

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.

采用MAXQ2000微控制器和MAX6970 LED驱动器显,Figure 1. MAX6970EVKIT schematic.,第2张
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.

采用MAXQ2000微控制器和MAX6970 LED驱动器显,Figure 2. Hardware configuration block diagram.,第3张
Figure 2. Hardware configuration block diagram.


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.

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/dianzi/2422220.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-08-02
下一篇 2022-08-02

发表评论

登录后才能评论

评论列表(0条)

保存