Mix and match HT1632C based LED Boards

You can connect as many modules as you have pins left. The desired module is selected by a CS line, without that line activated the chip won't react on anything on the data line.
Your problem may be that the Sure modules have only 4 CS lines on their inter-module connectors. If you feed in the signals once again after 4 modules (for the next 4 modules) you can use up to 16 modules (32x8) on one UNO. Don't expect one of the existing libraries to support the mixture of different types of modules though.

pylon:
You can connect as many modules as you have pins left. The desired module is selected by a CS line, without that line activated the chip won't react on anything on the data line.
Your problem may be that the Sure modules have only 4 CS lines on their inter-module connectors. If you feed in the signals once again after 4 modules (for the next 4 modules) you can use up to 16 modules (32x8) on one UNO. Don't expect one of the existing libraries to support the mixture of different types of modules though.

Thanks! So for each CS line I need one connector from Arduino, right?

So for each CS line I need one connector from Arduino, right?

One pin of a connector but I guess you meant that. So: yes.

That solves the hardware side but as I already wrote, you still have some work to do on the software side.

pylon:

So for each CS line I need one connector from Arduino, right?

One pin of a connector but I guess you meant that. So: yes.

That solves the hardware side but as I already wrote, you still have some work to do on the software side.

Thanks! Yeah I'll need to tweak library to get it working. I decided not to get that complex mix, but instead get four 24x16 single color panels. I've seen people already had it working (on Youtube) so I know it's doable. With 32x16 display there's only one CS pin needed, even if you are using 2 panels, but I just wasn't sure about 24x16 since in datasheet it has CS1-CS4

I have such a LED matrix display working with 4 modules 24x16. The CS1-CS4 are the CS lines for the HT1632Cs, on every module you select the appropriate CS line by using a DIP switch.

You'll find the library for up to four modules on my Arduino page: Libraries and other software for Arduino

Wow, thank you!

pylon:
I have such a LED matrix display working with 4 modules 24x16. The CS1-CS4 are the CS lines for the HT1632Cs, on every module you select the appropriate CS line by using a DIP switch.

You'll find the library for up to four modules on my Arduino page: Libraries and other software for Arduino

Do you have any kind of instructions how to use your library? :slight_smile: i.e. where do I define my pins form Arduino Uno for example.
What does this line mean?

de_dp11xxx dotmatrix = de_dp11xxx(PORTD, 7, 6, 2, 3, 4, 5,   4);

I tried changing it to my ports but program won't compile then...
Right now as a test I have Uno connected to single board like this:
Arduino -> DP-DP11111
D9 -> CS1
D10 -> WR
D11 -> DATA

and then ground and power... It kind of works with HT1632.h library, but I really wanted to get yours working :slight_smile:

The constructor is called with this scheme:

de_dp11xxx(port, data, wr, cs1, cs2, cs3, cs4, num);

where port is a GPIO port of the ATmega processor, PORTB in your case. "data" is the bit number (of the chosen port) where the data line is connected (3 in your case), "wr" is the bit number of the wr line (2 in your case) and the csX are the respective chip select bit numbers (so for you it's 1, 0, 0, 0). "num" is the number of chips your driving (1 in your case).

This means you have to instantiate the class like this:

de_dp11xxx(PORTB, 3, 2, 1, 0, 0, 0, 1);

pylon:
The constructor is called with this scheme:

de_dp11xxx(port, data, wr, cs1, cs2, cs3, cs4, num);

where port is a GPIO port of the ATmega processor, PORTB in your case. "data" is the bit number (of the chosen port) where the data line is connected (3 in your case), "wr" is the bit number of the wr line (2 in your case) and the csX are the respective chip select bit numbers (so for you it's 1, 0, 0, 0). "num" is the number of chips your driving (1 in your case).

This means you have to instantiate the class like this:

de_dp11xxx(PORTB, 3, 2, 1, 0, 0, 0, 1);

OK that makes sense. Thanks again! :slight_smile:

Is you code Open Source? i.e. can I modify and use it for my project? :slight_smile:

Is you code Open Source? i.e. can I modify and use it for my project?

Sure, that's why it is on my Arduino page :).
A big part of it is from the original ht1632 library, I just made the necessary changes to let it work with the single colored variants.

Can't seem to get mine to work. I am using a Sure 24x16 de-dp 11111. What Arduino IDE are you compiling it with?
Also can you help with pins used
I use
Data pin 2
Write pin 3
Cs pin 4
in code it looks like this

de_dp11xxx(PORTD, 2, 3, 4, 0, 0, 0, 1);
But only a few lights blink then nothing it goes blank.

Hello,

I never got mine to work. Using an Arduino 328, IDE 1.05 Sure de_dp11111 24x16 3mm Green leds

dp11xxx ledMatrix = de_dp11xxx(PORTD, 2, 3, 4, 0, 0, 0, 1);

Data pin 2
wr pin 3
cs1 pin 4

I get some random lights all over to light up then a few blink then it does nothing.

Thank you,
Randy

Any help please.

I'd suggest you try using plot function first.
BTW I have different code for driving 24x16 LED matrix display. I've modified it to run on 4 dp11111 displays (it can split screen real-estate between top 2 and bottom 2 displays. I use it in my Xronos Mega Clock prototype, but it works on ATMega1284p. Take a look, maybe you'll find it useful. It should work with one display, just play with settings in LED_2416.h file.

HTC2416_test.zip (16.7 KB)

Thanks so much. I will have a look at it tonight after work.

Out of all the examples in the folder

circle
demo
fill
geometry
life
line
pong

I can only get "fill" to work.

Arduino IDE 23-1.05
AtMega328
HT1632C

Does the Arduino IDE version make a difference?

Thanks for your help,

Randy

Does this sketch look right?
It uses plot like you said.

#include <de_dp11xxx.h>

de_dp11xxx ledMatrix = de_dp11xxx(PORTD, 2, 3, 4, 5, 0, 0, 2);

void setup() {
  ledMatrix.clear();
}

void loop() {
  byte x,y, neighbors, newval;

  ledMatrix.plot(12,9,1);  // Plant an "acorn"; a simple pattern that
  ledMatrix.plot(14,10,1); //  grows for quite a while..
  ledMatrix.plot(11,11,1);
  ledMatrix.plot(12,11,1);
  ledMatrix.plot(15,11,1);
  ledMatrix.plot(16,11,1);
  ledMatrix.plot(17,11,1);

  ledMatrix.plot(10,9,1);  // Plant an "acorn"; a simple pattern that
  ledMatrix.plot(12,10,1); //  grows for quite a while..
  ledMatrix.plot(9,11,1);
  ledMatrix.plot(10,11,1);
  ledMatrix.plot(13,11,1);
  ledMatrix.plot(14,11,1);
  ledMatrix.plot(15,11,1);

  delay(1000);   // Play life
  ledMatrix.sendframe();

  while (1) {
    for (x=1; x < ledMatrix.x_max; x++) {
      for (y=1; y < ledMatrix.y_max; y++) {
        neighbors = ledMatrix.getpixel(x, y+1) +
          ledMatrix.getpixel(x, y-1) +
          ledMatrix.getpixel(x+1, y) +
          ledMatrix.getpixel(x+1, y+1) +
          ledMatrix.getpixel(x+1, y-1) +
          ledMatrix.getpixel(x-1, y) +
          ledMatrix.getpixel(x-1, y+1) +
          ledMatrix.getpixel(x-1, y-1);

        switch (neighbors) {
        case 0:
        case 1:
          newval = 0;   // death by loneliness
          break;
        case 2:
          newval = ledMatrix.getpixel(x,y);
          break;  // remains the same
        case 3:
          newval = 1;
          break;
        default:
          newval = 0;  // death by overcrowding
          break;
        }
        ledMatrix.plot(x,y, newval);
      }
    }
    ledMatrix.sendframe();
    delay(1000);
  }
  delay(1000);
}
/code]

bratan:
I'd suggest you try using plot function first.
BTW I have different code for driving 24x16 LED matrix display. I've modified it to run on 4 dp11111 displays (it can split screen real-estate between top 2 and bottom 2 displays. I use it in my Xronos Mega Clock prototype, but it works on ATMega1284p. Take a look, maybe you'll find it useful. It should work with one display, just play with settings in LED_2416.h file.

Thanks for the files I have been able to use the plot function with great success but have not had any luck getting the Game of Life sketch to read which led's are on and off and then make the necessary changes. Is there a problem with the sketch? Or is it my Arduino? I am sure I have it connected right because the plot works.

Cheers

stadham:

Thanks for the files I have been able to use the plot function with great success but have not had any luck getting the Game of Life sketch to read which led's are on and off and then make the necessary changes. Is there a problem with the sketch? Or is it my Arduino? I am sure I have it connected right because the plot works.

Cheers
[/quote]
Well since plot works looks like you have everything connected right. I have no experience with Game of Life, so I can't help you there.
BTW I don't think you can read which LEDs are on/off, it has to be tracked in some kind of buffer in your sketch. Or I could be wrong... Hopefully someone who wrote library can respond...

I think you'r right. Which I am thinking must be harder to do on an Arduino? What would be a close language match that I can look up and try and change someone else's code. Would C++ code be close enough for me to hack?