HT16K33 and MAX6955 LED Drivers

Post and discuss new components that you have created.
Post Reply
mnfisher
Valued Contributor
Posts: 1740
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 147 times
Been thanked: 814 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 8 times

mnfisher
Valued Contributor
Posts: 1740
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 147 times
Been thanked: 814 times

Re: HT16K33 and MAX6955 LED Drivers

Post by mnfisher »

ht16k33.jpg
ht16k33.jpg (132.77 KiB) Viewed 66 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

Post Reply