Resource Library
Quick-Start: Driving 16-Segment Displays with the MAX6954
Abstract
This article is how-to guide, intended as a quick learning aid for engineers considering using the MAX6954 to drive 16-segment monocolor LEDs.
The MAX6954 is a versatile display driver, capable of controlling a mix of discrete, 7-segment, 14-segment, and 16-segment LED displays through a serial interface. This application note shows a typical application and configuration for driving eight mono-color, 16-segment LEDs.
See the MAX6954 data sheet for additional information about MAX6954 features.
"Quick-Start: Driving 7-Segment Displays with the MAX6954" and "Quick-Start: Driving 14-Segment Displays with the MAX6954" are similar application notes that discuss configuring the MAX6954 for 7-segment and 14-segment applications, respectively.
A common application for the MAX6954 is driving up to eight 16-segment mono-color LEDs. This application note guides the user through the process of connecting the MAX6954 to 16-segment displays and configuring the internal registers to control the displays using the included 104-character font map.
The MAX6954 utilizes a multiplex technique that reduces driver pin count by using ports alternately as cathode and anode drivers. This differs from the standard LED multiplex connection, which uses separate driver pins for anodes and cathodes. The technique is discussed in "Charlieplexing - Reduced Pin-Count LED Display Multiplexing". Table 1 lists the connection scheme for 16-segment digits that is compatible with the MAX6954 multiplex scheme and the built in 104-character font map. The letters in Table 1 correspond to the segment labels shown in Figure 2. Figure 1 illustrates an eight digit, 16-segment application circuit for the MAX6954.
DIGIT | O0 | O1 | O2 | O3 | O4 | O5 | O6 | O7 | O8 | O9 | O10 | O11 | O12 | O13 | O14 | O15 | O16 | O17 | O18 |
0 | CCO | a1 | a2 | b | c | d1 | d2 | e | f | g1 | g2 | h | i | j | k | l | m | dp | |
1 | -- | CC1 | a1 | a2 | b | c | d1 | d2 | e | f | g1 | g2 | h | i | j | k | l | m | dp |
2 | a1 | a2 | CC2 | -- | b | c | d1 | d2 | e | f | g1 | g2 | h | i | j | k | l | m | dp |
3 | a1 | a2 | -- | CC3 | b | c | d1 | d2 | e | f | g1 | g2 | h | i | j | k | l | m | dp |
4 | a1 | a2 | b | c | CC4 | -- | d1 | d2 | e | f | g1 | g2 | h | i | j | k | l | m | dp |
5 | a1 | a2 | b | c | -- | CC5 | d1 | d2 | e | f | g1 | g2 | h | i | j | k | l | m | dp |
6 | a1 | a2 | b | c | d1 | d2 | CC6 | -- | e | f | g1 | g2 | h | i | j | k | l | m | dp |
7 | a1 | a2 | b | c | d1 | d2 | -- | CC7 | e | f | g1 | g2 | h | i | j | k | l | m | dp |
Display test mode can be used to verify connections after connecting the MAX6954 to 16-segment displays. Display test mode overrides, but does not alter, all control and digit registers and turns all segments on. Enable display test mode by writing 0x01 to register 0x07. If a segment does not light in display test mode this indicates a connection problem that should be investigated. Write 0x00 to register 0x07 to exit display test mode.
After verification of the connections between the MAX6954 and the 16-segment displays the device must be configured for operation with 16-segment displays. Table 2 contains a list of the initial power-up states of important MAX6954 registers. When power is first applied to the MAX6954 the device is in shutdown mode, all digits are blanked, the 16-segment font map is selected and the device is set to scan the maximum eight digits. The default decode mode (0x01) and digit type (0x0C) register settings are correct for 16-segment applications.
REGISTER | POWER-UP CONDITION | ADDRESS (HEX) |
REGISTER DATA | |||||||
D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |||
Decode Mode | 16-segment font enabled | 0x01 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Global Intensity | 1/16 (minimum intensity) | 0x02 | X | X | X | X | 0 | 0 | 0 | 0 |
Scan Limit | Display eight 16-segment digits: 0, 1, 2, 3, 4, 5, 6, 7 | 0x03 | X | X | X | X | X | 1 | 1 | 1 |
Control Register | Shutdown enabled, blink disabled, blink speed is slow | 0x04 | 0 | 0 | X | X | 0 | 0 | 0 | 0 |
Display Test | Normal operation (display test disabled) | 0x07 | X | X | X | X | X | X | X | 0 |
Digit Type | Digits 0 through 7 are 16 segment digits | 0x0C | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Intensity10 | 1/16 (min on), digits 1 and 0 | 0x10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Intensity32 | 1/16 (min on), digits 3 and 2 | 0x11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Intensity54 | 1/16 (min on), digits 5 and 4 | 0x12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Intensity76 | 1/16 (min on), digits 7 and 6 | 0x13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Digit 0 | Blank digit, both planes | 0x60 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Digit 1 | Blank digit, both planes | 0x61 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Digit 2 | Blank digit, both planes | 0x62 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Digit 3 | Blank digit, both planes | 0x63 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Digit 4 | Blank digit, both planes | 0x64 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Digit 5 | Blank digit, both planes | 0x65 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Digit 6 | Blank digit, both planes | 0x66 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Digit 7 | Blank digit, both planes | 0x67 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
The configuration register (0x01) is used to enter and exit shutdown, control the blink function, globally clear the digit data and to select between global or digit-by-digit control of intensity. The configuration register contains 7 bits (Table 3):
- S bit selects shutdown or normal operation (read/write).
- B bit selects the blink rate (read/write).
- E bit globally enables or disables the blink function (read/write).
- T bit resets the blink timing (data is not stored-transient bit).
- R bit globally clears the digit data for both planes P0 and P1 for ALL digits (data is not stored-transient bit).
- I bit selects between global or digit-by-digit control of intensity (read/write).
- P bit returns the current phase of the blink timing (read only-a write to this bit is ignored).
CONFIGURATION REGISTER DATA BIT | DATA BIT LABEL | STATE | FUNCTION |
D7 | P | 0 | P1 Blink Phase |
1 | P0 Blink Phase | ||
D6 | I | 0 | Intensity for all digits is controlled by one setting in the Global Intensity Register |
1 | Intensity for digits is controlled by the individual settings in the Intensity10 through Intensity76 registers. |
||
D5 | R | 0 | Digit data for both planes P0 and P1 are unaffected |
1 | Digit data for both planes P0 and P1 are cleared on the rising edge of active-low CS | ||
D4 | T | 0 | Blink timing counters are unaffected. |
1 | Blink timing counters are reset on the rising edge of active-low CS. | ||
D3 | E | 0 | Blink function disabled |
1 | Blink function enabled | ||
D2 | B | 0 | Slow Blinking. Segments blink on for 1s, off for 1s with fOSC = 4MHz. |
1 | Fast Blinking. Segments blink on for 0.5s, off for 0.5s with fOSC = 4MHz. | ||
D1 | X | X | Don't care |
D0 | S | 0 | Shutdown |
1 | Normal Operation |
Enable the display driver with global intensity control and without blinking by writing 0x01 to register 0x04. The internal oscillator powers as the MAX6954 exits shutdown and the oscillator output is available at OSC_OUT. Notice that the 16-segment displays remain blank, as the power-up state of digit control registers 0x60 to 0x67 is 0x20 or no segments lit (see Table 2 and Figure 3).
The MAX6954 includes a 104-character ASCII font map for 16-segment displays. The characters follow the standard ASCII font, with the addition of the following common symbols: £, €, ¥, °, µ, ±, ≠, and . Seven bits represent the 104-character font map; an 8th bit is used to select whether the decimal point (DP) is lit (Table 4). Digit registers are implemented with two planes, P0 and P1. Each digit is represented by 2 bytes of memory, 1 byte in plane P0 and the other in plane P1 (see Table 7). The digit registers are mapped so that a digit's data can be updated in plane P0 (registers 0x20 through 0x27), plane P1 (registers 0x40 through 0x47), or both planes simultaneously (registers 0x60 through 0x67). The data in the digit registers does not control the digit segments directly for 16-segment displays. Instead, the register data is used to address a character generator that stores the data for the 16-segment font (Figure 3). The lower 7 bits of the digit data (D6 to D0) select the character from the font. The most significant bit of the register data (D7) controls the DP segment of the digits; it is set to 1 to light DP, and to 0 to leave DP unlit.
MODE | ADDRESS CODE (HEX) | REGISTER DATA | ||||||||
D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |||
16-segment mode, writing digit data to use font map data with decimal place unlit | 0x20 to 0x27 0x40 to 0x47 0x60 to 0x67 |
0 | Bits D6 to D0 select font character 0 to 127 | |||||||
16-segment mode, writing digit data to use font map data with decimal place lit | 0x20 to 0x27 0x40 to 0x47 0x60 to 0x67 |
1 | Bits D6 to D0 select font character 0 to 127 |
If the blink function is disabled through the Blink Enable Bit E (Table 3) in the configuration register, then the digit register data in plane P0 is used to multiplex the display. The digit register data in P1 is not used. If the blink function is enabled, then the digit register data in both plane P0 and plane P1 are alternately used to multiplex the display. Blinking is achieved by multiplexing the LED display using data plane P0 and plane P1 on alternate phases of the blink clock.
As an example let's display eight characters, "MAXIM-IC," using the MAX6954. We disabled the blink functionality when we programmed the configuration register, so data can be written to the 0x20 through 0x27 registers to control digit 0 through digit 7, respectively. Using the font map in Figure 3 determine the code equivalent for each character:
REGISTER ADDRESS (HEX) | DIGIT | CHARACTER | FONT MAP EQUIVALENT CODE | |
DECIMAL | HEX | |||
0x20 | 0 | M | 0100 1101 | 0x4D |
0x21 | 1 | A | 0100 0001 | 0x41 |
0x22 | 2 | X | 0101 1000 | 0x58 |
0x23 | 3 | I | 0100 1001 | 0x49 |
0x24 | 4 | M | 0100 1101 | 0x4D |
0x25 | 5 | - | 0010 1101 | 0x2D |
0x26 | 6 | I | 0100 1001 | 0x49 |
0x27 | 7 | C | 0100 0011 | 0x43 |
Adjust the intensity of the displays by writing to register 0x02, the global intensity control register. Intensity may be adjusted between 0x00 (minimum on, 1/16 current) and 0xFF (maximum on, 15/16 current). Digital control of display brightness can also be managed individually for each digit. For full details about adjusting digit intensity and other advanced features such as GPIO and key-scan, refer to the MAX6954 data sheet.
REGISTER (HEX) |
COMMAND (HEX) |
FUNCTION |
0x07 | 0x01 | Enter display test mode |
0x07 | 0x00 | Exit display test mode |
0x04 | 0x01 | Exit shutdown mode, disable blinking and select global intensity control |
0x20 | 0x4D | Write "M" to digit 0 |
0x21 | 0x41 | Write "A" to digit 1 |
0x22 | 0x58 | Write "X" to digit 2 |
0x23 | 0x49 | Write "I" to digit 3 |
0x24 | 0x4D | Write "M" to digit 4 |
0x25 | 0x2D | Write "-" to digit 5 |
0x26 | 0x49 | Write "I." to digit 6 |
0x27 | 0x43 | Write "C" to digit 7 |
0x02 | 0xFF | Set globalk intensity to full-scale |
REGISTER | ADDRESS (COMMAND BYTE) | ADDRESS (HEX CODE) | |||||||
D15 | D14 | D13 | D12 | D11 | D10 | D9 | D8 | ||
Decode Mode | R/active-low W | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0x01 |
Global Intensity | R/active-low W | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0x02 |
Scan Limit | R/active-low W | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0x03 |
Configuration | R/active-low W | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0x04 |
Display Test | R/active-low W | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0x07 |
Digit Type | R/active-low W | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0x0C |
Intensity 10 | R/active-low W | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0x10 |
Intensity 32 | R/active-low W | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0x11 |
Intensity 54 | R/active-low W | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0x12 |
Intensity 76 | R/active-low W | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0x13 |
Digit 0 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0x20 |
Digit 1 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0x21 |
Digit 2 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0x22 |
Digit 3 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0x23 |
Digit 4 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0x24 |
Digit 5 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0x25 |
Digit 6 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0x26 |
Digit 7 Plane P0 | R/active-low W | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0x27 |
Digit 0 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0x40 |
Digit 1 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0x41 |
Digit 2 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0x42 |
Digit 3 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0x43 |
Digit 4 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0x44 |
Digit 5 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0x45 |
Digit 6 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0x46 |
Digit 7 Plane P1 | R/active-low W | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0x47 |