Let's Make Robots!

Driving a dual color 8X8 64 LED Matrix Display

As you can see bellow i am in need of assistance to try and solve how to operate this display.

The componants i am using is:

1: PIC18F2520

2: Stereo Jack - For chip code download

3: DUAL COLOR 8X8 64 LED Matrix Display


The problems im having is finding the right parts to operate this device



6: Any other relative information would be great, thanks!

7: I will find out what multiplexing is later when i have the componants!, please do not involve this information.

Please post me links on the things that i need and information which would be usefull, thanks allot for your time!, prefrebly products i need from a UK electronics store.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ok, per our shout box decussion, your display is not serial enabled. First, you have to check the data sheet for the max current you can send to each led and select the proper resistor. Search LMR for "led glow not blow" --that post will tell you what you need to know. Second, figure out the pin-outs for the unit. Plug stuff in manually and figure out sorta how it works. Now we have to figure out your pin problem....

Take 3 of your displays and forget about them -get one working first. I know what a shift register is but I have no clue what it does or how to use it. Your screen name is total noob so this might not be the right direction to go. Instead, I would say to go with a i2c I/O expander. I2c communications are easy to learn and you can stack up almost as many expanders as you want on 2 output lines.

This one I have used and is quite simple. You simply send one byte in binary form and those 8 binary bits correspond to the state of the output pins on the chip. --8 bits, 8 outputs. Pretty cheap too.

The I2C I/O Expander is really just a shift register with slightly different controls. A shift register also reads in a string of serial data and spits it out in parallel through the output pins.
The main difference is how to chain them together - with I2C you use the chip select pins to choose the active IC, and they all share the same serial input line. You select IC #1 then send a byte, select IC #2 then send the next byte, etc.
The shift registers instead have the last output stage connected to a serial output pin which can be fed to the next shifter's input. To send data to multiple ICs you just send it as one string of bytes, with the first byte going to the IC on the end of the chain, 2nd byte goes to 2nd to last IC, etc.

Either way, you can control a theoretically infinite number of outputs with just a few pins from the microcontroller. Naturally there's a downside, which is that it the more output stages you add, the longer it takes to update them all. You also need to buy and install more ICs of course, but shifters and other similar logic chips are really cheap.

You've got 24 pins to control for each LED matrix, so you'll need 3 I2C or shifter ICs per matrix. The current output of the I2C or shifter ICs probably won't be enough to drive all the LED segments continuously, but you'll be able to run the displays at a lower duty cycle. Try this out on a breadboard and if you need more brightness you can add some higher current buffers to improve the output.

Just a couple more thoughts on i2c and i2c I/O expanders. When I said that you could stack up as many as you wanted, I had forgotten that these particular units are addressable through pins not via sent commands. This means that you hardwire the chip to tell it what address you want it at instead of "pre programming" it with i2c sends. This means that actually you can only stack up to 8 together. That being said, 64 inputs or outputs is still quite a lot and much more than you would need for a display.

Also --I suggest i2c because it is a very important skill to learn. Many things run off of i2c lines and when you learn the i2c system, you can run them all. External EEPROMS, servo drivers, i2c displays (the picaxe LCD needs i2c to access the clock function of the module) some distance sensors, all the wii things that people are doing --they all use i2c communications. I2c is very useful and should be learned at some point.

thats allot of neat information chris, may i ask what an I2C is?, or is it an output pin on a microcontroller?.

i2c is simply a system of communication. Your picaxe chip has 2 outputs labled SCL and SDA these are clock and data lines and you don't need to know what clock and data is. These lines need to be pulled up with (2) 4.7k resistors. A i2c enabled device will have these same connections as inputs. Connect them. All devices on this line will have an address. This address is used so the pic and the device know who is talking to who. In the case of the I/O expander I mentioned, it has 3 pins that are used to set the address --3 pins allows for up to 8 combinations. External eeproms work the same way. These pins are pulled high or low (by you --with wires) to establish this address. I.e. if all 3 pins are pulled low the address would be 000 if they are pulled high it would be 111 and there can be any other combination as well, again allowing up to 8 combinations.

To start talking, you begin with the seting up the i2c slave. You will need to read your data sheets to find if your device works fast or slow and byte or word -- again, don't worry about what this means you just need to find out what the data sheet says. In the case of this I/O expander, the slave command would look like this:

i2cslave %0111xxx0, i2cslow, i2cbyte  --where the xxx is the address you chose by setting the address pins high or low

Now the unit knows we are talking to it. From there, we simply send it commands with the writei2c command. We write this in binary form because it is much easier to read:

writei2c 0,(%00000000)  --this is all outputs off (low)

writei2c 0,(%11111111)  --this is all outputs on (high)

writei2c 0,(%10001001)  --outputs 0,3 and 7 are high, 1,2,4,5 and 6 are low

That's it. --Now this chip can be used for inputs as well and can be read using the readi2c command but I will skip that for now because you don't need it and I don't want to confuse anything.