Scrolling message on a 32x8 LED dot-matrix display (HT1632)

benryves

Senior Member
This PICAXE-28X1 code was developed to drive a cheap 32x8 LED dot-matrix display from Sure Electronics - the driver used is an HT1632 from Holtek Semiconductor.

The program displays a continuously scrolling message (up to 63 characters long) on the display (click here for a video). The code is not especially complicated, but as it can be rather frustrating trying to get devices responding at all initially I thought it might be useful to have some sample code!
 

Attachments

Last edited:

kevrus

New Member
Very nice job, opens up a number of ideas and you have done the hard work by sorting the characters into eeprom
 

westaust55

Moderator
Well done on getting your program running and the LED display working.

For your future information, although a little less universal, since the header indicates you have a 28X1, for the routines
LedWriteDataLsbFirst: and LedWriteDataMsbFirst:,
consider the SHIFTOUT command. See manual 2 (v6.9) page 192.
This has flags to enable you to set if the data is msb or lsb first and will reduce your code size.
 

benryves

Senior Member
Thank you for the comments. shiftout does look like it would have saved me some code, and would probably speed up refreshing the display considerably, so thank you for that tip!

The project I'm working on stores the full font data for the display in an external I²C EEPROM in three sizes (4x8, 6x8 and 8x8). If anyone's interested in the font data it can be found here in .fon (editable in Fony) and .png formats (the 6x8 one is based on the TI-83+ font and the 8x8 one is based on the BBC Micro font).
 

Tonywu15

New Member
Hey, i'm new to picaxe, i have worked with the 08M chip before. I'm thinking about buying a chip to drive the 0832 LED board from sure-electronics.

Which chip do you recommend (i'm currently looking at the 28X1)?

And how would I hook it up? Can anyone supply a circuit diagram\schematic?

Can it be done through the "PICAXE28 Project Board"?

this is a addon for my school project so i would prefer not to do too much soldering.

thank you so much!
 

benryves

Senior Member
The data sheet for the Sure displays can be found here. They have 16-pin IDC connectors on the back of the board (two rows of 8 pins). They come with a little ribbon cable, so I have plugged the ribbon cable into the back of the board and then inserted a wire from the corresponding hole in the other end of the ribbon cable to connect it to the breadboard. This is not very robust, but works well enough for prototyping!

Each display has two IDC connectors on the back; this is to allow you to chain up to four displays together. There's a small bank of switches on the back of the display to set the number of each display; if you're only using one, set the "1" switch on and the other ones off. You will then need to connect wires to CS1, WR, RD, DATA, GND and +5V. GND and +5V go to your power supply rails, CS1, WR, RD and DATA go to the PICAXE pins as per the LedCS, LedWR, LedRD and LedData symbols at the top of the sample source file.

As for selecting the chip, I'm not really sure what to suggest. The 28X1 seems more than capable (it may even be overkill?) especially if using the SHIFTOUT command speeds up writing to the display, but it depends on what you want to do with it. I can't see why the 28-pin project board wouldn't work, though!
 
Last edited:

westaust55

Moderator
Thank you for the comments. shiftout does look like it would have saved me some code, and would probably speed up refreshing the display considerably, so thank you for that tip!
Another change that can, from my past testing, provide speed improvements is to change the FOR...NEXT loops into DO . . . UNTIL loops

Removing a single multiplication from within a dispaly loop gave me around 5% speed increase. Changing from FOR..NEXT to DO...LOOP gained around a further 10% speed increase.

Obviously you need to concentrate on fine tuning the loops that are highly/most frequently executed to achieve better speed.
 
Last edited:

Tonywu15

New Member
The data sheet for the Sure displays can be found here. They have 16-pin IDC connectors on the back of the board (two rows of 8 pins). They come with a little ribbon cable, so I have plugged the ribbon cable into the back of the board and then inserted a wire from the corresponding hole in the other end of the ribbon cable to connect it to the breadboard. This is not very robust, but works well enough for prototyping!

Each display has two IDC connectors on the back; this is to allow you to chain up to four displays together. There's a small bank of switches on the back of the display to set the number of each display; if you're only using one, set the "1" switch on and the other ones off. You will then need to connect wires to CS1, WR, RD, DATA, GND and +5V. GND and +5V go to your power supply rails, CS1, WR, RD and DATA go to the PICAXE pins as per the LedCS, LedWR, LedRD and LedData symbols at the top of the sample source file.

As for selecting the chip, I'm not really sure what to suggest. The 28X1 seems more than capable (it may even be overkill?) especially if using the SHIFTOUT command speeds up writing to the display, but it depends on what you want to do with it. I can't see why the 28-pin project board wouldn't work, though!
I've now got the chip

I've hooked up the wires like this;

CS1 : Out 0
WR : Out 1
RD : Out 2
DATA : Out 3
GND : 0V
+5 : +V

I've downloaded your code into the 28X1 however nothing happens. The board does not light up? why is that?

Ribbon cable is like this right?

1357
****
****
2468

and so on...
Any help will be great!!

Thanks
 
Last edited:

tdg8934

New Member
New 0832 DEMO board available soon

I have been trying to find other micro-controllers that use the 0832 display. I (T&E Engineer - Tim Gilmore) use the Parallax SX28 and SX48 micro-controllers and have done some good things with the displays. http://forums.parallax.com/forums/default.aspx?f=7&m=354453

I have also found some work done using the Arduino boards: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225239439/145#145

However, I also wanted to let everyone know about the new DEMO board which is FREE (plus Im sure there will be shipping costs) for the 0832 boards and the the 2416 (to test only). They are on holiday at the moment but have emailed me to state that they will release a manual and have stock when they come back.

http://www.sureelectronics.net/goods.php?id=972
 

westaust55

Moderator
Here is my completed RGB design using the Holtek's newest chip HT1632C (which Sure Electronics displays -2416 and 0832 use the HT1632 obsolete LED driver).

It can use any micro-controller but my preference is the Parallax SX-48.

http://forums.parallax.com/forums/default.aspx?f=15&m=399718&p=4
I do not have an objection to references to non PICAXE chips here, but as this section of the PICAXE forum is for:
" Finished User PICAXE Projects" and in particular "PICAXE Code Snippets"​
it might be worthwhile to provide some sort of corresponding example PICAXE code that PICAXE users can use as a core to their projects.
 

wall_axe

Member
HT1632 code with SHIFTOUT

I used this code as a starting point to writing my own driver for the Sure Electronics 8x32 display. I modified this code to use the shiftout instructions and used a do...while loop. I hope the original poster doesn't mind the modifications.
 

Attachments

ihavenone

New Member
How can I display a static text string?

Thanks for the code.

It worked first time. I tried changing some of the loops to display a static text string, but to no avail.

How can I accomplish that?
 

westaust55

Moderator
@paco,

Welcome to the PICAXE forum.

Thank you for posting the M2 version.
While I personally may not have an immediate use for this, having such code available for all can be of great benefit when someone else wishes to undertake a similar project at a future date.
 
Top