You are on page 1of 4

opy review copy review copy review copy review c

MAX6954 Display Driver


A driver for
14/16 segment displays
A. Köhler

LED displays offer a number of advan- microcontroller. The MAX6954 16 steps in the display bright-
uses an SPI (serial program- ness so with a segment drive
tages over other display technologies: ming interface) while the source current of typically
MAX6955 uses an I2C inter- 40 mA, each step represents
they are reliable, robust, easily read- face. Both ICs are highly inte- a 2.5 mA reduction in the
grated and this short article drive current.
able from a wide viewing angle and only touches on some of the The internal clock fre-
features of the chip, for a quency is controlled by an
are relatively simple to drive. Along more detailed description it is external capacitor (typically
necessary to refer to the (38 22 pF) connected between
with the more usual 7-segment and dot page) data sheet [1]. the OSCIN input pin and
Figure 1 shows the inter- ground. All the internal
matrix types come the 14/16 segment nal block diagram of the processes in the LED con-
MAX6954 and the complete troller including the LED blink
displays. This article takes a closer look circuit diagram for this appli- frequency are referenced to
cation. The supply voltage this oscillator clock. The clock
at a versatile driver IC from Maxim. should lie between 2.7 V and output from OSCOUT (pin 37)
5.5 V (it can withstand 6 V for can be used to synchronise
a short period only). The sup- external circuitry to this
ply current consumption is driver clock.
35 mA maximum and typi- The LED drive circuitry
14/16-Segment displays are MAX 6954 and MAX 6955 cally 22 mA. Current to the has 19 outputs O0 to O18 and
arranged like 7-segment from Maxim are designed to segments is limited by an employs a number of different
types but with additional meet this need and can also internal programmable con- multiplexing techniques to
diagonals and centre vertical drive 7-segment displays and stant current source. The reduce wiring complexity.
segments. These extra seg- discrete LED indicators. character driver can be pro- Firstly the drive is time multi-
ments allow many more char- grammed so that the inten- plexed so that at one point in
acters (including special char- sity of the entire eight display the cycle the lower eight out-
acters) to be displayed but
SPI or I2C? characters is defined together puts are used to sink current
the extra segments demand a The function of both the (globally) or the intensity of from the common cathode
more complex driver circuit. MAX6954 and MAX6955 are each character is individually connection of the LED while
There is any number of 7-seg- similar. The only difference programmed. The intensity is at other times the current
ment drivers on the market between the two devices is defined by the value of the direction is reversed and the
but for 14/16 displays the the interface standard used to lower four bits written to the output acts as a current
choice is relatively small. The connect the device to the intensity register. This allows source to drive an individual

106 elektor electronics - 7-8/2004


opy review copy review copy review copy review c

+5V 21 Figure 1. Circuit diagram showing internal block diagram of the 40-
23 MAX6954
+
24
VCC P0
1 pin DIL version.
GPIO 2
and key-scan 38
control 39
220µ 10µ 100n 10n P4
40
17
18 O0
0 GND 7
19 PWM 8
brightness 9
control
10
BLINK blink
36 11
control
12
digit 13
multiplexer 14
LED
22 OSCIN drivers 15 a a a1 a2
divider/ 26
counter 27
OSCOUT network
22p 37 current 28 f b f h i j b f h i j b
source 29
19 ISET
30
31 g1 g2 g1 g2
g
32
character 33
RAM generator
ROM 34
47k O18 e c e m l k c e m l k c
35
dp dp dp
configuration register d d d1 d2

see text 4 DOUT


7-Segment Display 14-Segment Display 16-Segment Display
6 030335 - 12
3 CS 4-wire serial interface
5 CLK

33p 33p 33p 030335 - 11 Figure 2. 7, 14 and 16 Segment LED displays.


4k7 4k7 4k7

segment on the display. The 32 input switches or a key- mand is sent to the other mately 2 Hz otherwise it will
display brightness is con- board. The chip also performs three devices. around 1 Hz (assuming a
trolled by using pulse width built-in switch debouncing. A 4 MHz clock). Bit 3 inhibits (0)
modulation. A built in current part of this keyboard inter- Decode-Mode (01H) or enables (1) display blink-
source generator limits the face can also be used as a This register determines ing. The blinking can be used
maximum LED current and a general-purpose I/O port. whether the ASCII decoder to flash the display on and off
single resistor connected will be used to generate the or alternately to display two
between pin 19 and ground displayed character or the different characters. Bit 4
defines the value of this cur-
The internal LED segments will be indi- resets the blink timer. This is
rent. The manufacturer sug- Registers vidually driven. The type of useful in a system with multi-
gests a resistor value of The display driver has a com- LED used (defined in register ple display drivers: resetting
56 kΩ. plicated internal structure OCH) will influence the this bit on all the drivers in
Each display position has including a large number of decoded output. quick succession will ensure
two registers associated with internal configuration regis- that blinking of all the dis-
it (called plane 0 and plane 1). ters to control the chip and all Global Intensity (02H) plays will be synchronised.
One of these registers con- its functions. The values that If the global bit is set in 0C Bit 5 clears all the display
tains the actual display infor- need to be written to these register the entire display can data stored in both display
mation whilst the other regis- registers and their interde- be dimmed (15 levels). planes. Bit 6 is used to define
ter is a ‘background’ register. pendence on the contents of the type of display intensity
This allows new information other registers make the pro- Scan Limit (03H) control. A ‘0’ in this position
to be loaded to the back- gramming process a little Sets the number of segments means that the intensity of
ground register and then complicated. used for the display LEDs. the whole display will be set
quickly swapped with the dis- Some of the important reg- Also used to limit the number by the value stored in register
play register using just a sin- isters used in our application of keys scanned if input keys 02. A ‘1’ allows each dis-
gle command. An internal are described below but for a are used. played character to have an
decoder and character gener- fuller appreciation of the intensity defined by the 4-bit
ator allows 104 characters capabilities of this chip it is Configuration (04H) values stored in registers at
from the ASCII character set necessary to spend a little This register controls the con- address 10H to 17H. Bit 7 is
(including some special char- time studying the data sheet. figuration of the chip. For nor- read only and indicates
acters) to be displayed. The mal operation Bit 0 must be whether the display is cur-
chip also contains a decoder No-op (00H) set to a ‘1’ otherwise the chip rently on or off in the blink
for use with seven-segment This allows data to be sent to enters its shutdown mode. cycle.
LEDs. just one driver chip when, Bit 1 is unused. Bit 2 controls
Some of the outputs can say, four are daisy chained the blink rate. If the bit is set GPIO Data (05H)
also used to scan up to together. The No-op com- the blink rate will be approxi- This register is used to output

7-8/2004 - elektor electronics 107


opy review copy review copy review copy review c

Connection(s) Function 17, 18 ,20 Ground connections.


19 Connected to resistor that determines
1, 2, 38 ,39, 40 Freely programmable I/O-Ports, config- the maximum output current of the driv-
urable as inputs or as open-drain out- ers.
puts. Also used by keyboard interface. 21, 23 ,24 Positive supply voltage connections.
3 CS connection of SPI. Good decoupling required because the
4 Allows multiple MAX6954’s to be daisy- LED drivers are capable of very fast
chained. Also acts as a data output if switching.
internal register values are to be read 22 Connect to a capacitor to determine
back. speed (frequency) of all internal opera-
5 Clock input for SPI. tions. Also accepts external clock.
6 Data input for SPI. Copy receive regis- 36 Supplies blink rate for external synchro-
ter numbers and values to this pin. nisation purposes. Open-drain output.
7-15,26-35 Outputs for LED display. These pins 37 Supplies buffered Internal oscillator
work in digit as well as segment driv- clock signal to synchronise other
ers. Non-activated drivers go into hi- MAX6954s.
impedance state. 16, 25 Not connected.

data on the General Purpose depending on the global bit are not new registers but a and the LEDs. Connections
I/O pins. Input data can be setting in the configuration command to write to both the to the LEDs are not detailed
read from address 85H. register (0CH). P0 and P1 register stores on the circuit diagram
together. because pin-outs are gener-
Port Configuration (06H) Digit Plane 0 (20H to 2FH) ally not consistent between
Selects how the five port pins These 16 registers store the Key Debounced/Pressed different types of LED from
outputs are used in the circuit. displayed characters. The (88H to 8FH) different manufacturers. The
interpretation of these char- A ‘1’ in any position in this data sheet from Maxim
Display Test (07H) acters is dependant on the register indicates that a key details these interconnec-
A 1 in this register will light number of segments used for press was detected in this tions (O0 to O18) to various
all the LED segments includ- the display LED used (digit position during the last key display devices including a
ing the decimal point. Normal type in register OCH). For 14 scan routine. It can determine discrete LED matrix and 7 to
operation continues when the or 16 segment displays the if the key was pressed 16 segment displays.
register is 0. seven LSBs indicate the momentarily or if the key was The SPI to the driver chip
ASCII value of the display held down. uses a minimum of three sig-
Key Mask/Key Debounce character. The MSB controls nal wires (together with
(08H to 0BH) the decimal point. In 7-seg- The internal ASCII character earth of course). An extra
These four registers are used ment mode with decoding generator does not contain wire can be fitted (DOUT
if a keypad is connected, it bits D0 to D3 are decoded via any lower-case characters pin 4) if it is necessary to
allows some selected the ASCII look up table while (they cannot be represented read back information from
(masked) keys to generate an D7 controls the decimal point. on the displays) and will the chip registers. Included
interrupt when the key press If the decode mode is not always output upper-case with the development board
has been debounced. selected each bit will directly characters irrespective of from Maxim is a complete
control an LED. These regis- whether the upper case or software package for pro-
Digit Type/Key Pressed ters act as the ‘foreground’ lower case ASCII code is gram development, the
(0CH) stores and are displayed dur- used. The special characters author chose QBASIC. This
The type of display can be ing the first blink phase are displayed using codes in software allows simple
written to this register. The (plane P0). the range of 08H to 2FH. access to the PC parallel
register is divided into 4 printer port running in DOS.
‘slots’ of 2 bits, these are Digit Plane 1 (40H to 4FH) The source files are all avail-
used to define the display Identical to Digit Plane 0 but
A simple able free to download from
type. Maxim have an exam- the contents are displayed in application the Elektor Electronics web-
ple configuration program the second blink phase (back- The circuit diagram of a sim- site, look for file number
available to download from ground register). ple application example (Fig- 030335-11 under month of
their website. ure 1) shows how few exter- publication.
Digit Plane 0/1 (60H to 6FH) nal components are neces- The first program
Intensity (10H to 17H) Data written to these address sary to implement a display. employs some of the basic
This changes the brightness ranges will write to both P0 The most difficult part of cir- features of the MAX6954.
of each individual character (20H to 2FH) and P1 (40H to cuit construction is the wiring Eight values are input and
or of all characters together 4FH) at the same time. These between the driver circuit displayed on the LEDs. The

108 elektor electronics - 6/2004


opy review copy review copy review copy review c

SPI data transfer ICS

The input signal thresholds of the SPI-Interface are fixed at 0.6 V


CLK
and 1.8 V, this enables the device to be interfaced directly to both
3 V-CMOS and 5 V-TTL logic families. The input current to the inter- DIN D15 D14 D13 D0

face is approximately 1 mA. Signal reflections on the SPI interface


can sometimes be a problem (particularly at 5 V) so it is recom- DOUT D0 D1 D14 D15

mended to terminate the DIN, CS and CLK signals with either a previous
transmission
4.7 KΩ or a 33 pF capacitor to ground. To transfer data a the CS 030335 - 13

input is pulled low to indicate the start of data transmission, the most
significant bit of the data stream is now presented to the DIN pin and this bit is clocked into an internal shift register on the ris-
ing edge of the clock. This process repeats until the last bit of the data stream is received, CS now goes high before the clock
signal goes low and this will store the received message into an internal latch. Each message is 16 bits long, the most signifi-
cant eight bits defines both the 7-bit address of the internal register and the read/write bit while the next eight bits are the data
to be written into that register. The chip can be clocked at 8 MHz but MAXIM recommend a more conservative 4 MHz.

program consists of an ini- second program implements isation procedure is identi- to clarify the steps neces-
tialisation routine, display a running-text display with cal to the first program. Both sary to configure the inter-
data input and a central a maximum message length of the programs are a little nal registers.
data transfer routine. The of 80 characters. The initial- basic (ouch) but should help (030335-1)

See your design in print!


Elektor Electronics (Publishing)
are looking for
Freelance Technical Authors/Designers

If you have
 an innovative or otherwise original design you would like to see in print
in Europe’s largest magazine on practical electronics
 above average skills in designing electronic circuits
 experience in writing electronics-related software
 basic skills in complementing your design with an explanatory text
 a PC, email and Internet access for efficient communication with our
in-house design staff

then do not hesitate to contact us for exciting opportunities in getting your designs published on a regular basis.

Elektor Electronics
K. Walraven, Head of Design Dept.
P.O. Box 75, NL-6190-AB Beek, The Netherlands, Fax: (+31) 46 4370161
Email: k.walraven@segment.nl

6/2004 - elektor electronics 109

You might also like