Holtek 16K33 LED driver AND Pushbutton Chip

OLDmarty

Senior Member
Hi all,

The Holtek 16K33 seems to be part of many LED display boards these days.
The chip is relatively easy to drive with a picaxe for LEDs etc.

However, (before i try re-inventing the wheel) has anyone actually mastered how to read pushbuttons into this chip?

The datasheet shows it can read upto 39 buttons, in a 3 x 13 matrix as part of the LED matrix wiring.
I've had a few reads, and filtering out the chinglish aspect doesn't leave me feeling confident about addressing and reading the buttons pressed.

Have any of the Guru's out there tried button encoding on the 16K33 before?

Thanks in advance.
 

hippy

Technical Support
Staff member
I haven't used the HT 16K33 m self. It does appear it has been used in at least one PICAXE project -

https://picaxeforum.co.uk/threads/programming-adafruit-4-digit-displa7-ht16k33.26028/

There also appears to be comprehensive and comprehensible datasheet here -

http://www.holtek.com/documents/10179/116711/HT16K33v120.pdf

I have yet to read through that. Existing code for the PICAXE or for other microcontrolllers will hopefully show what needs to be done to get it to work and clarify any aspects of the datasheet which may be unclear.

Do you actually have any HT16K33 chips or are you simply thinking about using them ?
 

hippy

Technical Support
Staff member
However, (before i try re-inventing the wheel) has anyone actually mastered how to read pushbuttons into this chip?
With the caveat of not actually having done it; it looks simple enough. There seems to be two key things about the chip ; first that all data transfers are 16-bit, a two byte pair read and write, and key pressed data seems to be a 3 word read.

Using "HI2CIN $40,(b0,b1,b2,b3,b4,b5)" should read all key press data into w0,w1 and w2. Then it's just bit processing to tell which keys are pressed.
 

OLDmarty

Senior Member
I haven't used the HT 16K33 m self. It does appear it has been used in at least one PICAXE project -

https://picaxeforum.co.uk/threads/programming-adafruit-4-digit-displa7-ht16k33.26028/

There also appears to be comprehensive and comprehensible datasheet here -

http://www.holtek.com/documents/10179/116711/HT16K33v120.pdf

I have yet to read through that. Existing code for the PICAXE or for other microcontrolllers will hopefully show what needs to be done to get it to work and clarify any aspects of the datasheet which may be unclear.

Do you actually have any HT16K33 chips or are you simply thinking about using them ?
Thanks Hippy,
My initial learning how to picaxe/program this chip was from the picaxe link you provided ;-)

I do have a few of the display boards, but i recently received the 16k33 genric driver board without 7-seg display fitted.
It's designed to breakout all the pins to a socket or breadboard or whatever.

I started reading more into the data sheet, as i figured it would be a handy chip to process buttons AND leds and take a load of code processing away from the picaxe itself.
 

OLDmarty

Senior Member
With the caveat of not actually having done it; it looks simple enough. There seems to be two key things about the chip ; first that all data transfers are 16-bit, a two byte pair read and write, and key pressed data seems to be a 3 word read.

Using "HI2CIN $40,(b0,b1,b2,b3,b4,b5)" should read all key press data into w0,w1 and w2. Then it's just bit processing to tell which keys are pressed.
Thanks again Hippy,

ok, now you've made it clearer to me what i need to do.
I was reading the data sheet info not quite the way you explained it, which was confusing for me.

I'll aim to get my 16k33 hooked up to a few buttons and see how things go as i hack away at some code to prove the concept for myself.

p.s. it's strange that it seems nobody is using these chips for pushbutton processing. It's either too hard for most people to convey into their code, or maybe the chip performs poorly or something?

I won't know until i get something working in front of me ;-)
 

hippy

Technical Support
Staff member
it's strange that it seems nobody is using these chips for pushbutton processing. It's either too hard for most people to convey into their code, or maybe the chip performs poorly or something?
I would guess they either haven't heard of it or, and perhaps more likely, most people use so few buttons that a direct connection to a PICAXE is easier and simpler. Even a large matrix keypad isn't that demanding.
 

westaust55

Moderator
As Hippy has said it can be a case of who has heard of the chip being asked about whether your current query or someone else’s query past or future.

I have not used the Holtek chip but have used a PT6961 which is similar in approach with LED display drivers and keypad scanning.
That chip uses SPI interfacing.
I long ago posted one of my “Getting started ....” tutorials on the PT6961.

However as Hippy has also stated there are other methods and I have also done LED and LCD displays using 1-wire networks with and without keypad scanning (need an X1 or X2 part for 1-wire networks).
I have also done keypads in 4x4 array with resistors into 1 PICAXE analog input plus other schemes/ICs dedicated to more than 16 keys.

I have also designed and build a project where it was driving an LCD display and 4x4 keypad directly from a PICAXE where the four data lines for the LCD also formed 4 of the drive lines for the keypad.

So in summary there are many ways to achieve driving of displays and reading keypads such that few folks actually end up using the same method.
 
Top