Bit Guide Poster
Bit Guide Poster
Bit Guide Poster
Created by Ladyada
Guide Contents
Guide Contents 2
Overview 3
Mini 8x8 Matrix 5
Mini 8x8 Matrix Software 8
0.56" 7-Segment Backpack 11
Seven-Segment Backpack Firmware 14
We wrote a basic library to help you work with the 7-segment backpack. The library is
written for the Arduino and will work with any Arduino as it just uses the I2C pins. The
code is very portable and can be easily adapted to any I2C-capable micro. 14
Bi-Color 8x8 Matrix 17
Bi-Color 8x8 LED Backpack Firmware 20
F.A.Q. 22
Downloads 23
Buy an LED Backpack 24
The product kit comes with a fully tested and assembled LED backpack, a 4-pin header and the
matrix of your choice. A bit of soldering is required to attach the matrix onto the backpack but
its very easy to do and only takes about 5 minutes.
Of course, in classic Adafruit fashion, we also have a detailed tutorial showing you how to
solder, wire and control the display. We even wrote a very nice library for the backpacks so you
can get running in under half an hour, displaying images on the matrix or numbers on the 7-
segment. If you've been eyeing matrix displays but hesitated because of the complexity, his is
the solution you've been looking for!
Solder 'em!
Next, download the Adafruit LED Backpack library from github (http://adafru.it/aLI) . To download
Once you're happy that the matrix works, you can write your own sketches. The 8x8 matrix
supports everything the Adafruit GFX library - drawing pixels, lines, rectancles, circles, triangles,
roundrects, and small bitmaps. For more details check out the GFX page which will detail all of
the GFX routines. (http://adafru.it/aJH)
All the drawing routines only change the display memory kept by the Arduino. Don't forget to
call writeDisplay() after drawing to 'save' the memory out to the matrix via I2C.
There are also a few small routines that are special to the matrix:
setBrightness(brighness)- will let you change the overall brightness of the entire
display. 0 is least bright, 15 is brightest and is what is initialized by the display when you
start
blinkRate(rate) - You can blink the entire display. 0 is no blinking. 1, 2 or 3 is for display
blinking.
Next, download the Adafruit LED Backpack library from github (http://adafru.it/aLI) . To download
click the DOWNLOADS button in the top right corner, rename the uncompressed
folder Adafruit_LEDBackpack. Check that the Adafruit_LEDBackpack folder
contains Adafruit_LEDBackpack.cpp and Adafruit_LEDBackpack.h Place
the Adafruit_LEDBackpack library folder your arduinosketchfolder/libraries/ folder. You
may need to create the libraries subfolder if its your first library. You'll also need to download
the Adafruit GFX library (http://adafru.it/aJa) - its not actually used for the 7-segment, its only for
the matrix backpacks but its still required. Restart the IDE.
There's a few ways you can draw to the display. The easiest is to just call print - just like you
do with Serial
If you need more control, you can call writeDigitNum(location, number) - this will write
the number (0-9) to a single location. Location #0 is all the way to the left, location #2 is the
colon dots so you probably want to skip it, location #4 is all the way to the right. If you want a
decimal point, call writeDigitNum(location, number, true) which will paint the decimal
point. To draw the colon, usedrawCo lo n(true or false)
If you wnat even more control, you can call writeDigitRaw(location,bitmask) to draw a raw
8-bit mask (as stored in a uint8_t) to that location.
All the drawing routines only change the display memory kept by the Arduino. Don't forget to
call writeDisplay() after drawing to 'save' the memory out to the matrix via I2C.
There are also a few small routines that are special to the backpack:
setBrightness(brighness)- will let you change the overall brightness of the entire
display. 0 is least bright, 15 is brightest and is what is initialized by the display when you
start
blinkRate(rate) - You can blink the entire display. 0 is no blinking. 1, 2 or 3 is for display
blinking.
Solder 'em!
Next, download the Adafruit LED Backpack library from github (http://adafru.it/aLI) . To download
click the DOWNLOADS button in the top right corner, rename the uncompressed
folder Adafruit_LEDBackpack. Check that the Adafruit_LEDBackpack folder
contains Adafruit_LEDBackpack.cpp and Adafruit_LEDBackpack.h Place
Once you're happy that the matrix works, you can write your own sketches. The 8x8 matrix
supports everything the Adafruit GFX library - drawing pixels, lines, rectancles, circles, triangles,
roundrects, and small bitmaps. For more details check out the GFX page which will detail all of
the GFX routines. (http://adafru.it/aJH)
All the drawing routines only change the display memory kept by the Arduino. Don't forget to
call writeDisplay() after drawing to 'save' the memory out to the matrix via I2C.
There are also a few small routines that are special to the matrix:
setBrightness(brighness)- will let you change the overall brightness of the entire
display. 0 is least bright, 15 is brightest and is what is initialized by the display when you
start
blinkRate(rate) - You can blink the entire display. 0 is no blinking. 1, 2 or 3 is for display
blinking.
The best way to get up and running is to read the HT16K33 driver datasheet available at <a
href="http://learn.adafruit.com/adafruit-led-
backpack/downloads">http://learn.adafruit.com/adafruit-led-
backpack/downloads</a><span class="pdf-short-link"> (http://adafru.it/aMx)</span> - the
backpacks all use this chip to do all the LED driving. You can cross-reference this document
with the Arduino library code to adapt it to your platform. Any microcontroller that has I2C
host support should be able to drive the backpacks but we only provide Arduino example
code at this time<br><br>
Download the Adafruit LED Backpack library from github (http://adafru.it/aLI) - This code
provides support for the mini 8x8, 7-segment and bicolor LED matrix backpacks.
To download click the DOWNLOADS button in the top right corner, rename the
uncompressed folder Adafruit_LEDBackpack. Check that
the Adafruit_LEDBackpack folder
contains Adafruit_LEDBackpack.cpp and Adafruit_LEDBackpack.h Place
the Adafruit_LEDBackpack library folder your arduinosketchfolder/libraries/ folder.
You may need to create the libraries subfolder if its your first library. You'll also need to
download the Adafruit GFX library (http://adafru.it/aJa) - its not actually used for the 7-
segment, its only for the matrix backpacks but its still required. Restart the IDE.
You'll also need to download the Adafruit GFX library (http://adafru.it/aJa) that provides the
graphics drawing routines, and must be installed even if you're not using the GFX routines!
Schematic and PCB files are available from Github (http://adafru.it/aLJ) - in Eagle 6 format.
The backpacks all use the HT16K33 chip solely for LED driving (http://adafru.it/aMy) - the
mini 8x8's use the 24 pin version and the others use the 28 pin vesion