Controlling a HT1632C

Andrew Cowan

Senior Member
Browsing around Sureelectronic's website, I've spotted their 32x16 dot matrix bicolour LED display pannel. If a PICAXE can handle it, I'm looking to get two, connected to form a 16x64 LED pannel.

Each display is run by four HT1632C driver ICs - (display datasheet).

Each HT1632C has 32 byte registers, and controls two 8x8 bicolour matrix displays.

Connections:
Chip select
Chip select clock
Data
Data clock

Before I order two of these displays to play with (for no particular project), I want to ensure they are PICAXEable. While I'm sure the PICAXE can drive them, I'm not sure how one would go about storing letters/numbers etc in the PICAXE and formatting those on the displays. I would probably use an X2 at 64MHz.

Searching on the forum, there is one thread regarding a very similar display, although it is only a monocolour 8x32 display. However, the code shows it can be done.

This is just a fun project to keep me occupied - I guess a final goal would be to display information (time, temperature, weather) on the display. But that's a few months away!

So - does this sound feasible?

Andrew

Videos of the displays being driven by arduinos:
Video 1
Video 2
Video 3
 
Last edited:

westaust55

Moderator
Seems to be do-able with a PICAXE

SPI like comms

The C program example is for a PIC operating at 8 MHz.

The C routine: CommandWriteHT1632C
seems to be very similar to MSB first bit-bashed SHIFTIN / SPI like data transfer.

Go forth and play/experiment.
We expect your writeup at the end of the month :)


You can always store data in an External EEPROM or F-RAM if you need to.
 

Andrew Cowan

Senior Member
There's plenty of discussion on the arduino side of the internet about the interfacing - shouldn't be too hard to figure out. I think that a 28X2 at 64MHz should have enough speed to handle scrolling text/simple animation - I'll go for it.

I'll post an update in about a month ;)

Andrew
 

Andrew Cowan

Senior Member
14 days later, and the first of the two displays has showed up.

It's a nice interface - I've been playing with it using a 20X2 using the SPIout routines. There are two SPI connections - one driving the chip select pins, and one driving the four HT3216s per board.

My query is in displaying text on the boards, due to the non-obvious display mapping.

Each board is split into four sections, each controlled by a HT3216C. Each HT3216 has 64 four bit registers, although you can address these as 32 eight bit registers.

In this mode, the first 16 memory addresses control the green LEDs in an 8x16 section, and the second 16 addresses control the red LEDs. I can see how you would write text to an 8x16 section - just filling up the register as you move along the display.

I'd like to make a sort of serial backpack for this, with a serial input displaying text on the two lines. However, it seems like a complex task to look up characters codes, then work out what register to put them in.

One way I can imagine of doing this would be to:
- Store the character codes in EEPROM
- Store the message to be displayed in the scratchpad
- Slowly work through the scratchpad, looking up each character and displaying it.

This is a pretty complex system, and I'm starting to get rather confused! How would you approach as task like this?

Thanks

Andrew
 

westaust55

Moderator
If you were only going to use the displays as a form of alphnumeric display with 8x8 pixel character size and each character in one of 4 "colours (off, red, green or red+green), then you could keep a single map of the data and use a colour variable (value 0 to 3) to determine if an area for each colour was clear or one.

You may still do better to keep the character font in EEPROM as the likes of eclectic and I have done previously with ex mobile phone LCD displays.

If you want to get more complex with variable width fonts and images where not all pixels in one 8x8 "cell" are the same colour or a character overlaps two 8x8 "cells" then you will need to create a data map for the entire display with separate sections for each colour and then copy the data across.

The second method would be more versatile but requires more data and maths to undertake.

So as you can see, you will need to identify your intended use/goals clearly before you start or you will end up re-working the code if you want to move form a type 1 to a type 2 control system later.
 
Top