lamaPLC: HT16K33 display controller

HT16K33 7-segment display The HT16K33 is a memory-mapped, multi-function LED controller driver. The device supports a maximum of 128 display segments (16 segments and 8 commons) and a 13×3 Maximum matrix key scan circuit. The software-configurable features of the HT16K33 make it suitable for a wide range of LED applications, including LED modules and display subsystems. The HT16K33 is compatible with most microcontrollers and communicates via a two-line bidirectional I²C bus.

HT16K33 IC Feature

  • Operating voltage: 4.5V–5.5V
  • Integrated RC oscillator
  • I²C-bus interface
  • 16×8-bit RAM for display data storage
  • Max. 16×8 patterns, 16 segments, and eight commons
  • R/W address auto-increment
  • Max. 13×3 matrix key scanning
  • 16-step dimming circuit
  • Supports 20/24/28-pin SOP package types
HT16K33 7-segment displayHT16K33 dot matrix displayHT16K33 dot matrix display

I²C addressing

The base I²C address for an HT16K33 is 0x70, but it can be changed to one of seven other addresses by setting the four address pins (A0-A3) via hardware. Each HT16K33 chip can have a unique address from 0x70 to 0x77. If multiple HT16K33 devices are used on the same bus, each must have a distinct address, and if you use more than one, their addresses must be sequential, such as 0x70, 0x71, 0x72

If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.

Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.

2026/02/14 23:38

Schema

12*8 display application: (No INT pin function and 10*3 key function): 12*8 display application: (No INT pin function and 10*3 key function)

Arduino Wiring Diagram

The HT16K33 uses standard I²C pins. Connect your display as follows:

HT16K33 PinArduino Uno PinArduino Mega PinDescription
VCC5V5VPower (4.5V–5.5V)
GNDGNDGNDGround
SDAA420Serial Data
SCLA521Serial Clock

Required Libraries

You will need two libraries from Adafruit:

  • Adafruit LED Backpack Library
  • Adafruit GFX Library

Install these via the Arduino Library Manager (Tools > Manage Libraries…).

Arduino Example Code

This sketch demonstrates basic numeric display and colon control using the Adafruit_LED_Backpack library.

#include <Wire.h>
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"
 
// Create the display object (Default I2C address is 0x70)
Adafruit_7segment matrix = Adafruit_7segment();
 
void setup() {
  matrix.begin(0x70);  // Initialize with I2C address
  matrix.setBrightness(10); // Set brightness from 0 to 15
}
 
void loop() {
  // 1. Display a whole number
  matrix.print(1234, DEC);
  matrix.writeDisplay();
  delay(2000);
 
  // 2. Display a floating point number
  matrix.print(12.34);
  matrix.writeDisplay();
  delay(2000);
 
  // 3. Simple Counter with blinking colon
  for (uint16_t counter = 0; counter < 100; counter++) {
    matrix.println(counter);
    matrix.drawColon(counter % 2 == 0); // Blink colon every other tick
    matrix.writeDisplay();
    delay(200);
  }
}

https://docs.arduino.cc/libraries/simple-ht16k33-library/

Sources

I²C topics on lamaPLC

PageDateTags
2026/04/23 21:51, , , , , , ,
2025/09/23 21:25, , , , , ,
2026/03/22 03:14, , , , , , ,
2026/04/23 21:52, , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , ,
2026/03/28 23:50, , , , , , ,
2026/04/12 00:34, , , ,
2026/04/23 21:52, , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , ,
2026/03/22 00:08, , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/04/23 21:52, , , , , , , ,
2025/05/31 23:32, , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , ,
2025/11/22 00:07, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2023/07/01 17:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/03/22 01:44, , , , , , , , ,
2026/04/23 21:52, , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , , , ,
2026/04/23 21:51, , , ,
2026/04/23 21:52, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/04/11 19:54, , , , , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/02/14 18:27, , , , , , , , , ,
2026/04/23 21:52, , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , ,
2026/04/15 19:41, , , , , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , , , , ,
2026/02/14 23:47, , , ,
2026/02/14 23:51, , , , , ,
2026/02/14 18:26, , , ,
2026/04/23 21:52, , , , , , , , , , , , ,
2026/04/23 21:52, , , , , , , , , , ,
2026/04/23 21:52, , , , , , , ,
2026/03/05 21:19, , , , , , , , , , , , , , , , ,
2026/02/14 18:27, , , , , , ,




This page has been accessed for: Today: 4, Until now: 5