Pages: [1]   Go Down
Author Topic: Large LED Matrix (8 x 24 to 8 x 32)  (Read 4274 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

 smiley
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33966
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 27, 2011, 06:47:30 am by Grumpy_Mike » Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 533
Posts: 26953
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12070
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: