Go Down

Topic: SureElectronics 3216 Led Matrix (Read 26351 times) previous topic - next topic


Wagner Sartori Junior

will you port your wiseclock2 code to 3216?

Tim Gilmore

I just ran the wiseclock2 code on my 3216 and it runs.

However, everytime I make a change to the coding, and try to save it, I get a message saying that I have to rename it because some files are "read only". It's kind of a pain having multiple versions of coding.

How do I fix this?

Tim Gilmore


Can you show me specifically where I can find your 2 display code on the wiki. All I see is the code for your real time clock.

I have 2 displays connected together and can't figure out how to use them together yet.

I did do the following:

change the CHIP_MAX: #define CHIP_MAX 8

change the plot function:

 byte nChip = 1 + x/16 + (y>7?2:0) ;  
 if (x>=32) {
   nChip = 3 + x/16 + (y>7?2:0);
 } else {
   nChip = 1 + x/16 + (y>7?2:0);
 x = x % 16;
 y = y % 8;

shadowram has to be [64][8] matrix(I substitute the [64][4] for [64][CHIP_MAX]): byte ht1632_shadowram[64][CHIP_MAX] = {0};

All the working code is available at HT1632C page at playground.

Do I need to change X_MAX to 64 ?:

#define X_MAX 32
#define X_MAX 64

Tim Gilmore

I figured out Wagners program to get it to display on 2 (3216) boards but I had to remove all of the RT Clock coding.

However, no disrespect to Wagner but I like florinc's program better as far as displaying multicolored text but I could not get it to follow Wagner's directions to adapt it to work with 2 (3216) boards. At one point it started to work but not exactly on the 2nd board to the full screen (just the 1st quadrant).

I'm shooting in the dark here. Any specifics I'm missing for florinc's code to get it to display on 2 boards?

Thanks again for all your great work!

Wagner Sartori Junior

I agree that florinc's code is better than mine by far. I bought my first arduino, resistors, led matrix, motor, etc... two weeks ago. Also my C/C++ knowledge comes from universisty(6 months of basic stuff), I never did something real in C/C++.

To make dual board work, yes, you have to set X_MAX to 64.

If you copy the playground code(I did this just to check if the code there works perfectly), it'll work. Just don't use the RTC code, don't initialize on setup() and take it off from loop(). You can print any character in any color. Also check that my arduino pins are 50,51,52,53, maybe yours is on different pins!

e.g: put these lines on loop()
Code: [Select]
 char STRING1[ ]="TIM     ";
 char STRING2[ ]="GILMORE ";
 int x,i,j;
 for(x=1;x<sizeof(STRING1);x++) {
       if (~buffer[i][j] & (1<<0)) {
       } else {
 for(x=1;x<sizeof(STRING2);x++) {
       if (~buffer[i][j] & (1<<0)) {
       } else {

Tim Gilmore


The code is very nice and it works. But I think I am going to look into a smaller font like the one used by florinc. Great job!



Please provide a link to the display board you guys are coding for.

Tim Gilmore


Here is a photo showing the code you wrote: http://i204.photobucket.com/albums/bb95/tdg8934/IMG_1105.jpg


The displays are sold by Sure Electronics in China in either 3 mm or 5 mm LED versions. The picture link above is the larger 5 mm version. Here are the links:



Wagner Sartori Junior


I'm using the 2 x 3mm version. It's amazing for the price.

Tim Gilmore

I think I may have found a glitch either in florinc's ht1632_putchar routine or in how it is reacting to a 2 display combination.


Notice where the 'C' and the 'H' is, there is a flickering red 4 dot (nibble?) anomolly. In the photo it is not seen well next to the 'C' but the 'H' is noticible.

It does not matter what is displayed but only happens when the ht1632putchar routine is run on a 2 display setup.


See ZIP file attachment. I still haven't found a way to not have to save the PDE files with a different name as I reported before that some files are read only.

Also any better place to attach files as this forum requires online storage from what I can tell.

Anyway - If florinc and/or Wagner can take a look at this combined code to see what the issue might be with the RED 4 LEDs flickering?

Thanks again!

Wagner Sartori Junior

First of all Merry Christmas!  ;)

I'm having some problems with ghost characters too, mainly when I enable "shadowram" to check on memory before doing anything on chip. So I disable it on my code.

I opened two threads to try to resolve this specific problem:

Also, I read a lot the Miles Burton HT1632 class to see if I can correct this issue but I didn't figure out yet.

I got florinc's wiseclock2 code and forked it. I make a HUGE refactor on code, migrating to HT1632C, took out some classes(IR Sony control, SD Card, microfat implementation) I'm not using and implement a way to save variables/text at device EEPROM and/or RTC, you choose and I changed the alarm music to Mario Bros theme  ;D . Note that I'm not using Arduino IDE, I made an environment on my eclipse using AVR Eclipse Plugin, so I can't guarantee it'll compile without little code changes.

I called it TrunetClock and is available at(sorry I'm doing commits on portuguese, I'll start making in english):

Be free to change, implement, fork or anything you want. I don't take it out your credits from code, actually I didn't include myself :) . I'll talk to you later to see if you can start "producing" a wiseclock3 with dual display, 3216 and other stuff. I'm not able(I don't know how) to design a circuit board yet and make the "box" in plastic mainly in Brazil.

I'll not have time until January 10th to see these arduino stuff. I'm going on vacations, so good luck.

Tim Gilmore

I figured out how to get florinc's 6x8 font (and plotting routine in multi-colors to display correctly on Wagner's code for 2 displays without the flicker issue as reported before. I needed to use Wagners Get Pixel routine which did the job right!

Thanks to both florinc and Wagner as I have managed to combine both great programs.


See attachments at the link for a picture and Arduino code.

Tim Gilmore

I ran into another issue. Just when I thought the code was working it was not. If I unplug the USB cable and plug it back in again, only the first display comes up with its "ABC..." display and the 2nd display is blank. If I re-program it again, the 2nd display still stays off.

However, If I program it with Wagner's 2 display code, his code works on both displays. But then I can program my code and it works too again on both displays (which makes no sense). But when I pull the USB power cable out and plug it back in again, only the first display is on with the "ABC..." displayed. It's almost like the 2nd display needs to be triggered or something to accept and display data.

Any ideas?

Tim Gilmore

Found the problem and fixed it. It was that CHIP_MAX was not used entirely through out the program and now it is. All is working now for displaying multi-colored letters/numbers on 2+ 3216 RG displays.

Thanks again to Wagner and florinc.


See link for the updated Arduino code.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131