Go Down

Topic: Large LED Matrix (8 x 24 to 8 x 32) (Read 4765 times) previous topic - next topic

seanlano

I thought I would jump in at the deep end, so to speak, and try to build an LED Matrix for my first big Arduino project. I've done a little bit of other stuff before this, but not quite this big. And it seems that controlling 8 x 24 = 192 LED's and getting them to do what they're supposed to do is a bit harder than I anticipated...

Anyway, I'm using 4 shift registers (HC595) - 3 for the anodes and 1 for the cathodes via BC548 transistors. I have managed to make the entire display light up by lighting every anode (in columns) and rapidly cycling through the cathodes (in rows). But now I am stuck as to how to actually get something meaningful onto my display.


I have several questions:

Since "shiftOut" can only do 8 bits, what should I do to control 24 bits of column data? I know I have to use shiftOut repeatedly to push through the data to all 4 registers, but how to I split a 24 bit long into 3 bytes? I can't use lowByte and highByte, because that would only work for 16 bits.

How do I define a list of alphabetic characters into an array that can then be put out to the LED's?

This http://code.google.com/p/remco-avr/source/browse/Bastiaan/klaar/klaarintxt.txt looks useful, but it's in Dutch and I don't understand all of the code. It looks as though he's using two independent shift register chains, using six pins from the Arduino. Would this be easier?


There's more questions too, I need to think about them first.

:)

Grumpy_Mike

#1
Jan 27, 2011, 12:30 pm Last Edit: Jan 27, 2011, 12:47 pm by Grumpy_Mike Reason: 1
Quote
but how to I split a 24 bit long into 3 bytes?

LowByte = val & 0xff;
MiddleByte = (val >> 8 ) & 0xff;
TopByte = (val >> 16 ) & 0xff;

Or you could just write an equivalent of shift out for 24 bits. Shift out is only a function someone else has written it is not an integral part of the language.

CrossRoads

Shiftout is all software, right Mike? I read that SPI could also be used, is hardware driven and much faster.
Can't help much with content.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

MarkT

For designing glyphs (character patterns) start with some squared paper and a pencil and design one that has the right dimensions...

Then treat the squares as bit positions in a binary number, treating each row separately - this gives a value to shift into the LED drivers (best expressed in hexadecimal).  Send the correct rows of data to the correct rows of LEDs and the pattern should appear lit up.   However you have to be quite clear as to what counts as a row as opposed to column and the directions up/down/left/right.  At least mistakes will be quite easy to see.
[ I won't respond to messages, use the forum please ]

60400

Maybe it is a bit out of the topic, but if you can use three MAX72xx, this tutorial makes it really easy: http://www.pjrc.com/teensy/td_libs_Matrix.html

I am using it for a project I'm working on and it's worth spending the money on the MAX7219.

P18F4550

Hi All,
To add another twist on the subject http://arduino.cc/forum/index.php/topic,1533.0.html
I have successfully lifted a HD44780 chip off a broken LCD and resoldered it to a breakout pcb i have etched, applied leds to the outputs and connected the chip to my Duemilanove as a 4bit LCD, to my amazement it works, the leds are very dim but i knew they would need driver transistors, the goal is create a 1 x 16 char Led matrix display using some 5x7 Led matrix's, by adding the HD44100 chip i also lifted will make it a 2 x 16 char display.
Best of all this chip can be wired and communicated with by means of the liquidcrystal lib, creating custom chars will be as easy as writing to CGRam

Go Up