This library was written to control one or two MAX6954 chips with an Arduino. It was originally written for use in this project: Lights Out Arcade Box.
Download or clone this repository into your Arduino libraries folder. On Mac OS or Linux you can run this in the terminal to get up and running.
cd ~/Documents/Arduino/
mkdir libraries
git clone https://github.com/AnthonyDiGirolamo/MAX6954.git max6954
Once installed you should be able to see a max6954 menu option under File > Examples > max6954 within the Arduino IDE.
I connected the MAX6954s to the arduino using the SPI pins (see the connections section from the arduino reference page on SPI). For the Uno or Duemilanove the pins are:
- Master out slave in (MOSI) or DOUT - Pin 11
- Master in slave out (MISO) or DIN - Pin 12
- Clock (SCK) or CLK - Pin 13
- Chip 1 Select (SS) or CS - Pin 9
- Chip 2 Select (SS) or CS - Pin 8
The MAX6954 Data Sheet says that the chips can be chained (see Figure 2. MAX6954 Daisy-Chain Connection) but I was getting data corruption with my setup. The corruption completely went away when I controlled each chip individually.
To connect the MAX6954 to your 16 segment digits refer to Table 2. Connection Scheme for Eight 16-Segment Digits and Figure 1. Segment Labeling for 7-Segment Display, 14-Segment Display, and 16-Segment Display in the data sheet. I used these digits.
You can also use 14 segment displays for font output. 14 segment digits haven't been tested with the lowercase font or individual segment control. See setup section of the string_output.ino file for how to activate 14 segment digits.
See also:
This example shows how to output string using the built in font provided on the MAX6954 itself. It also demos lowercase strings which are generated by turning individual segments on and off.
Code: string_output.ino
This example demonstrates the use of individual digit brightness control.
Code: larson.ino
This example shows how to address individual segments on each digit. It's a bit more advanced than the previous examples. It requires writing values to registers directly to the max6954. See the comments in the code for more info.
Code: segment_control.ino