Pages: 1 2 3 [4] 5 6   Go Down
Author Topic: SureElectronics 3216 Led Matrix  (Read 11338 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My updated (includes initialization bug fix) demo code can be downloaded from here:
http://code.google.com/p/wiseclock2/downloads/detail?name=HT1632.zip&can=2&q=#makechanges
Logged

São Paulo/SP/Brazil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 305
Brazilian Arduino Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

florinc:
will you port your wiseclock2 code to 3216?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wagner,

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
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

São Paulo/SP/Brazil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 305
Brazilian Arduino Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
 char STRING1[ ]="TIM     ";
  char STRING2[ ]="GILMORE ";
  int x,i,j;
  for(x=1;x<sizeof(STRING1);x++) {
    null_buffer();
    for(i=0;i<8;i++){
      for(j=0;j<8;j++){
        set_buffer(STRING1[x-1]);
        if (~buffer[i][j] & (1<<0)) {
          ht1632_plot(j+(8*(x-1))-1,i,RED);
        } else {
          ht1632_plot(j+(8*(x-1))-1,i,BLACK);
        }
      }
    }
  }
  for(x=1;x<sizeof(STRING2);x++) {
    null_buffer();
    for(i=0;i<8;i++){
      for(j=0;j<8;j++){
        set_buffer(STRING2[x-1]);
        if (~buffer[i][j] & (1<<0)) {
          ht1632_plot(j+(8*(x-1))-1,i+8,GREEN);
        } else {
          ht1632_plot(j+(8*(x-1))-1,i+8,BLACK);
        }
      }
    }
  }
  delay(10000);
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wagner,

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!

Tim
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wagner,

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

Novice,

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:

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

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

São Paulo/SP/Brazil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 305
Brazilian Arduino Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Novice,

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://i204.photobucket.com/albums/bb95/tdg8934/IMG_1107.jpg

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.

http://forums.parallax.com/showthread.php?128037-Sure-Electronics-new-32x16-bi-color-display-3216-RG&p=963161#post963161

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!
Logged

São Paulo/SP/Brazil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 305
Brazilian Arduino Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

First of all Merry Christmas!  smiley-wink

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:
http://stackoverflow.com/questions/4523653/how-to-compare-a-memory-bits-in-c
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1293153942

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):
https://bitbucket.org/trunet/trunetclock

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 smiley . 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.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://forums.parallax.com/showthread.php?128037-Sure-Electronics-new-32x16-bi-color-display-3216-RG&p=963275#post963275

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://forums.parallax.com/showthread.php?128037-Sure-Electronics-new-32x16-bi-color-display-3216-RG&p=963554#post963554

See link for the updated Arduino code.
Logged

Pages: 1 2 3 [4] 5 6   Go Up
Jump to: