WS2801 5x5 matrix

Hello,

i created with my 25 pixel led strand a 5x5 matrix, i want to use it to display text.

the alphabet looks like these

#define A		{0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1}
#define B		{1,1,1,1,0,1,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,1,1,1,0}
#define C		{0,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,1,1,1,1}
...

.

in attachment, you see how i come in that aray

can someone help me with code?

WS2801 is an RGB LED driver - presumably you have an RGB LED strip?
Then you woud also need to know the color at each location.
The data to send out will then be 3 bytes x 25 WS2801s.
So you might have:

for (x=0; x<75, x=x+1){
SPI.transfer(pixelArray[x]);
}

with the first 3 bytes being the Red-Green-Blue data for pixel 24, the next 3 for pixel 23, etc. and the last 3 for pixel 0.
(using a count from 0 to 24 vs 1 to 25).
If you just want white for every pixel, then every place where you have 1 you could modify the loop to send out 3 bytes of 255 (0xFF), and three bytes of 0 for off.

for (x=0; x<25, x=x+1){
  if (pixelArray[x]== 1){
  SPI.transfer(0xff);
  SPI.transfer(0xff);
  SPI.transfer(0xff);
  }
  else{
  SPI.transfer(0);
  SPI.transfer(0);
  SPI.transfer(0);
  }
}

If something else will be using SPI, then you can add a logic gate to implement an external chip select function to prevent SCK from toggling when some other SPI transfer is going on. A simple AND gate will do, and use an Active High chip select - when high, the output of the gate follows the SCK signal.

digitalWrite (WS2801CS, HIGH);
for (x=0; x<75, x=x+1){
SPI.transfer(pixelArray[x]);
}
digitalWrite (WS2801CS, LOW);

i dont understand at all, yes i use a ledstrand of 25pixels

Read the datasheet to start. Specifically the diagram at the top of sheet 12 (when turned sideways).

WS2801.pdf (423 KB)