LED Bitmask Tool
Adafruit sells a variety of popular LED displays that are widely used by the maker community. A few of the most popular displays are:
- 4-Digit 7-Segment Display (see product #879)
- 4-Digit Quad Alphanumeric Display (see product #1911)
- Mini 8x8 LED Matrix (see product #870)
In addition to the displays, Adafruit provides robust Arduino libraries and a helpful tutorial on how to setup and use the displays in your project. Still, getting the correct segments to light-up requires construction of a bitmask which can be a bit of a chore if you are creating a large number of custom characters or messages in your project.
A bitmask is simply a binary number where each bit indicates whether a specific segment of the display is lit or not. The binary number (or sometimes its hexadecimal equivalent) is passed to a library function to drive the display. The different types of displays require a different number bits (8 for the 7-segment, 15 for the alphanumeric, and 64 for the 8x8 matrix) and each has a unique mapping of segments to bits.
The LED Bitmask Tool is a small Windows utility to help create custom bitmasks for use with the Adafruit displays and libraries. It lets you toggle the segments on and off and automatically updates the resulting bitmask. A screenshot of the utility is shown below (click for a larger version):

Installation
Simply download and run the following setup file and the LED Bitmask Tool will be installed on your system. A shortcut for the program will be created in your Start Menu and on your Desktop. Alternatively, the LED Bitmask Tool can be downloaded as a zip file, extracted to a location of your choice, and manually started by executing the LEDBT.exe executable.
How to Use
When started, the tool shows a section with a blank (all segments are off) representation of each type of display. The three display sections operate independently of each other. To create a new character or pattern, simply click on a segment to toggle it on or off. As an aid, each display has a fill ("F") button, which turns on all segments, and a clear ("C") button, which turns off all segments. As you turn the segments on and off the binary bitmask (and hexadecimal equivalent) is updated and displayed below the display.
The binary and hexadecimal values can be copied and utilized directly in the Adafruit libraries for the displays. To aid with this, each display section has export (copy to clipboard) and import (copy from clipboard) buttons on each side of the binary or hexadecimal fields. Pressing the export button next to a field will copy that field value to the clipboard. Pressing the import button next to a field will take a value from the clipboard and, if formatted correctly, will populate the field and update the display segments to match the imported bitmask.
Created: 29 Apr 2022Last updated: 3 May 2022