HT16K33 and MAX6955 LED Drivers

Post and discuss new components that you have created.
Post Reply
mnfisher
Valued Contributor
Posts: 2096
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 165 times
Been thanked: 965 times

HT16K33 and MAX6955 LED Drivers

Post by mnfisher »

Creating a component for the MAX6955 display driver had been mentioned - and as the HT16K33 is closely comparable (it lacks an inbuilt character set and per digit brightness) - doing both at the same time seemed a good idea (to me at least :-) )

These LED drivers can drive 8 x 14 segment (+dp) displays - or 128 LEDs or handle an array of buttons (debounced in the case of the MAX chip). To complicate things slightly - they can also handle 16 x 7 segment displays!

The HT16K33 arrived first (AliExpress) - and it has 4 x 14 segment digits attached.

I'm hoping others will contribute - or at least play along. My first step (always) - is a very basic program - to check that I can actually 'talk' to the hardware - no point in writing reams of code - to find that nothing is displayed!

So - step 1) Initialise the display
Step 2) Output some data

Initialisation is simple - I added properties to the 2d panel for number of digits and i2c address (this 0x70 usually) - and the i2c_master component. I used an Arduino (mainly for speed - upload etc to an esp32 for example is much slower) - as a a robust test bed.

The display needs SDA, SCL, Gnd, VCC and VI2C (which sets the level for the i2c comms / logic VCC drives the LEDs)

To initialise we send 0x21 (start the oscillator), 0x81 (display on) and 0xEF (set brightness to 15 (max) - note this will need modifying on the MAX device) I set each display to 0xFFFF (illuminate everything - unnecessary but fun) then 0 (all off)

Then I write each possible value to each display - actually just the main segments (not the dp) - and all seems good :-)

The description probably took longer to write than the program!

One thing to note - each digit takes a 16 bit value defining the state of each individual LED segment - we will use a lookup table to define our character set. To write to a digit - the address is digit * 2. I'm not sure if the address auto increments - so to check data sheet - for extra speed when writing multiple digits..

Martin
Attachments
HT16k33_First_Contact.fcfx
(12.74 KiB) Downloaded 190 times

mnfisher
Valued Contributor
Posts: 2096
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 165 times
Been thanked: 965 times

Re: HT16K33 and MAX6955 LED Drivers

Post by mnfisher »

ht16k33.jpg
ht16k33.jpg (132.77 KiB) Viewed 2030 times

Note that the display is just 'plugged' into the Arduino - and is upside down - dp at top left! I just photographed a 'random moment' - and digit 4 is yet to change to reflect the others (probably should have added a delay!) The digits look rather brighter - and the off segments are far less noticeable to the eye...

Data sheet is at https://cdn.sparkfun.com/assets/3/f/8/6 ... 33v120.pdf

Amongst others.

The wiring is for another project - apart from the VCC and GND - going over the top - and why do my projects always seem to have some fluff on them?


Martin

mnfisher
Valued Contributor
Posts: 2096
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 165 times
Been thanked: 965 times

Re: HT16K33 and MAX6955 LED Drivers

Post by mnfisher »

Fleshing things out slightly...

I added a character map - I think the uppercase letters are more successful than lowercase, as the sizes vary for lowercase in a jarring manner. It supports all the printable ASCII characters ' ' .. '~' (95 characters) This tested with the HT16 chip (and should work with the MAX chip in no-decode mode)

I added DisplayStr, DisplayStrScroll (which scrolls the string across until it has all been displayed), DisplayInt, DisplayHex and DisplayFloat.. I've used DisplayStr for int and hex - and scroll for float - but anyone any thoughts?

The demo displays a string, a negative integer, a hex and a floating point number. Then the entire character set.

It might just be my eyes - but feels like there is a slightly longer pause before the final character of a scrolled string?


Martin
Attachments
HT16k33_Chars.fcfx
(24.74 KiB) Downloaded 202 times

andeug
Posts: 112
Joined: Thu Jan 07, 2021 1:42 pm
Location: Stockholm (SE)
Has thanked: 40 times
Been thanked: 6 times

Flowcode v11 Re: HT16K33 and MAX6955 LED Drivers

Post by andeug »

Hi Martin,


I've been looking today over the datasheet of MAX6955 and the MAX6955EVKIT, and they are some tricky stuff to take care of:

- note the wiring from Table 2 (page 8). The more digits you have, the wiring will change.
- on page 37, the wiring for a 16-segment display is given. As you can see, the digits 0 and 1 are the same, but digits 2 and 3 are changing the wiring:
Screenshot 2026-07-15 at 12.07.49.png
Screenshot 2026-07-15 at 12.07.49.png (179.05 KiB) Viewed 224 times
I don't know who wins - a configuration of 2x TPIC6B595/74HC595, but you have to work on the firmware, or the MAX6955, which has a predefined font map, but a bit challenging display wiring.

So, when a new display is added in the SW configuration of Flowcode, rewiring each pair of displays must be planned.

Anyway, both setups look industrial-grade to me, and I am sure that a clock project would be unique using this display configuration...


Andreas
Attachments
MAX6955EVKIT.pdf
(468.77 KiB) Downloaded 11 times
MAX6955.pdf
(492.09 KiB) Downloaded 11 times
FC11 Professional + ARD + AVR + ARM license + Matrix TSL E-blocks2 boards
Mikroe Click boards + Arduino Nano/Uno Click Shield

mnfisher
Valued Contributor
Posts: 2096
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 165 times
Been thanked: 965 times

Re: HT16K33 and MAX6955 LED Drivers

Post by mnfisher »

That's odd - I see digits 3 and 4 use pins 2 and 3 as their CC pins. I would expect that the chips handles this invisibly - though all will be revealed.

I'm glad I don't have to do the wiring :-)

Martin

andeug
Posts: 112
Joined: Thu Jan 07, 2021 1:42 pm
Location: Stockholm (SE)
Has thanked: 40 times
Been thanked: 6 times

Re: HT16K33 and MAX6955 LED Drivers

Post by andeug »

Yeah, it's not that fun to work with MAX6955 from the HW perspective.
I have also found that KiCad does not have libraries for 16-segment displays, so they must be created manually.
Another challenge I discovered today is that 14-segment displays use horizontal wiring, whereas 16-segment displays use vertical wiring.
This is a bit of a pain because with vertical wiring, it's hard to do the back-wiring when the displays are stuck together, and the breadboards I found are mostly for horizontal wiring.

I need to find a solution - either I will use 14-segment displays in my display project, or I will have to make some compromises for the 16-segment solution...

The MAX6955EVKIT is ideal, because you don't see these challenges until you look at how strange the wiring is... :D

Andreas
FC11 Professional + ARD + AVR + ARM license + Matrix TSL E-blocks2 boards
Mikroe Click boards + Arduino Nano/Uno Click Shield

Post Reply