Skip to content

Commit 2581729

Browse files
pyhyskartben
authored andcommitted
boards: shields: Add Adafruit HT16K33 LED matrix shield
Product photo from https://learn.adafruit.com/assets/87051 with the license CC BY-SA 3.0 Tested with the command mentioned in the index.rst page. Signed-off-by: Jonas Berg <[email protected]>
1 parent eba3128 commit 2581729

File tree

6 files changed

+100
-1
lines changed

6 files changed

+100
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Jonas Berg
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_ADAFRUIT_HT16K33
5+
def_bool $(shields_list_contains,adafruit_ht16k33)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2025 Jonas Berg
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&zephyr_i2c {
8+
status = "okay";
9+
10+
ht16k33_adafruit_ht16k33: ht16k33@70 {
11+
compatible = "holtek,ht16k33";
12+
reg = <0x70>;
13+
};
14+
};
25.6 KB
Loading
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.. _adafruit_ht16k33:
2+
3+
Adafruit HT16K33 LED Matrix Shield
4+
##################################
5+
6+
Overview
7+
********
8+
9+
The `Adafruit Small 1.2 inch 8x8 LED Matrix with I2C Backpack`_ features
10+
a `Holtek HT16K33 LED Controller Driver`_, an 8x8 LED matrix and two STEMMA QT connectors.
11+
12+
This shield definition can also be used with other shields having a HT16K33 LED
13+
controller. The controller exposes up to 128 LEDs, and the mapping between a LED number
14+
and a physical LED might differ on different shields.
15+
See `Discussion on other LED backpacks`_.
16+
17+
.. figure:: adafruit_ht16k33.webp
18+
:align: center
19+
:alt: Adafruit 8x8 LED Matrix Shield
20+
21+
Adafruit 8x8 LED Matrix Shield (Credit: Adafruit)
22+
23+
24+
Requirements
25+
************
26+
27+
This shield can be used with boards which provide an I2C connector, for
28+
example STEMMA QT or Qwiic connectors.
29+
The target board must define a ``zephyr_i2c`` node label.
30+
See :ref:`shields` for more details.
31+
32+
33+
Pin Assignments
34+
===============
35+
36+
+--------------+-------------------+
37+
| Shield Pin | Function |
38+
+==============+===================+
39+
| SDA | HT16K33 I2C SDA |
40+
+--------------+-------------------+
41+
| SCL | HT16K33 I2C SCL |
42+
+--------------+-------------------+
43+
44+
See :dtcompatible:`holtek,ht16k33` for documentation on devicetree settings.
45+
46+
47+
Programming
48+
***********
49+
50+
Set ``--shield adafruit_ht16k33`` when you invoke ``west build``. For example
51+
when running the :zephyr:code-sample:`ht16k33` sample:
52+
53+
.. zephyr-app-commands::
54+
:zephyr-app: samples/drivers/ht16k33
55+
:board: adafruit_qt_py_rp2040
56+
:shield: adafruit_ht16k33
57+
:goals: build
58+
59+
.. _Adafruit Small 1.2 inch 8x8 LED Matrix with I2C Backpack:
60+
https://www.adafruit.com/product/1632
61+
62+
.. _Discussion on other LED backpacks:
63+
https://learn.adafruit.com/adafruit-led-backpack
64+
65+
.. _Holtek HT16K33 LED Controller Driver:
66+
https://www.holtek.com/page/vg/HT16K33A
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) 2025, Jonas Berg
4+
5+
shield:
6+
name: adafruit_ht16k33
7+
full_name: Adafruit HT16K33 LED Matrix Shield
8+
vendor: adafruit
9+
supported_features:
10+
- led

samples/drivers/ht16k33/sample.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ sample:
33
name: HT16K33 sample
44
tests:
55
sample.drivers.ht16k33:
6-
platform_allow: nrf52840dk/nrf52840
6+
platform_allow:
7+
- nrf52840dk/nrf52840
8+
- adafruit_qt_py_rp2040/rp2040
9+
extra_args:
10+
- platform:adafruit_qt_py_rp2040/rp2040:SHIELD="adafruit_ht16k33"
711
harness: TBD
812
tags: LED

0 commit comments

Comments
 (0)