Olimex 8x8 LED Matrix

So my father gave me this 8x8 led matrix...

And I don`t know how to use it. It has the following pins:
GND, DATA, LATCH, SCK (i think this is the clock) and VCC.

I know how to wire it up to the Arduino, but i don`t know how to make it display something using Serial Monitor. I assume that there must be a library of letters, something like this:

00000000
00000000
00XXXX00
0X0000X0
0XXXXXX0
0X0000X0
0X0000X0
0X0000X0

//this would be letter A, and so on for the other letters...

Can anyone help me with the code?

So hi, have you tried this demo code from Olimex website?

https://www.olimex.com/Products/MSP430/Booster/MOD-LED8x8/resources/MOD-LED8X8.zip

EDIT: Sorry, that sketch is not going to run on an Arduino. Not without expert adaptations.

But it should certainly be possible to use the matrix with an Arduino. You may have to write your own sketch.

The schematic on Olimex's website shows it contains 2 74xx595 shift registers and a uln2803 attached to one of them to boost its current sinking capabilities.

If you can't find a sketch for it I can help you write a simple one, although you will have to test the sketch because I don't have a display like yours.

Paul

I wired it like this:

LATCH - pin6
CLOCK - pin7
DATA - pin5

I can upload your sketch and tell you if it works :slight_smile:

Xeyow:
I can upload your sketch and tell you if it works :slight_smile:

Cheeky! OK then, try this. But once this works, the next step is yours.

#define LATCH 6
#define CLOCK 7
#define DATA 5

byte pattern[8] = {
  B00000000,
  B00000000,
  B00111100,
  B01000010,
  B01111110,
  B01000010,
  B01000010,
  B01000010
};

void setup() {
  pinMode (LATCH, OUTPUT);
  pinMode (CLOCK, OUTPUT);
  pinMode (DATA, OUTPUT);
}

void loop() {
  for (byte i=0; i<8; i++) {
    digitalWrite(LATCH, LOW);
    shiftOut(DATA, CLOCK, LSBFIRST, pattern[i]);
    shiftOut(DATA, CLOCK, LSBFIRST, 1<<i);
    digitalWrite(LATCH, HIGH);
    delay(2);
  }
}

Xeyow:
So my father gave me this 8x8 led matrix...

Oh dear! No wonder he didn't want it! :smiley: It's a right pain to operate - you have to write code to perform the multiplexing continuously.

It's a demonstration "toy". Much more convenient and practical are the (quite cheap) ones which use a proper MAX7219 driver - a single IC which is designed for the purpose and performs all the multiplexing, current control and brightness control (of the whole display) for you in a single chip with just one resistor (and bypass capacitors).

(When I say "much cheaper", I refer to the Chinese knock-offs - which do work. Presumably Olimex figured the HC595s and ULN were cheaper - which may be correct, but at the substantial expense of functionality.)

Ty paul! It works. It displays letter A. But can you tell me what latch clock means, and what they do? can you explain the code? :slight_smile:

I will try to update your code, using more letters, and try to cascade them!

Great!

I can explain more later, but for now, try this and tell me what happens. See that "delay(2)"? Try increasing it to 4, then 8, 16, 32, 64, 128...

Paul

So... i increased the delay as you said: and the result is this:

The rows cascade from up to down! But the smaller the delay, the harder you see the cascade. At delay(64) you can see it very well.

Yes, that is the secret of multiplexing. It looks like all the rows are lit at once but in reality only one row at a time is lit. Its just too fast to see.

The Arduino is doing the multiplexing. Every 2 milliseconds it sends out a row of data to the display. The same 8 rows must be sent over and over.

The max7219 chip that Paul__B was talking about is often used for 8x8 matrices. Its more sophisticated than the basic chips on your display. It does the multiplexing itself. The Arduino only has to send the data once each time the display changes. The chip then does the multiplexing, leaving the Arduino free to do other things.

However, the Arduino is pretty fast and can multiplex a display with basic chips and still do quite a lot of other things at the same time.

You asked about what the clock and latch connections do. Have a look at this to see if it helps you understand:

If anyone is still interested in how to interface the Olimex Matrix: I wrote a little c-class and an example sketch to interface the Matrix. You can find the code here: GitHub - lutzer/OlimexLEDMatrix: Arduino Library for interfacing a single Olimex (RGB and non-RGB) 8x8 Matrix