I have 3 74HC595 chips cascading to power a dual-color, 24-pin, LED matrix from sparkfun (see datasheet here: http://www.sparkfun.com/commerce/product_info.php?products_id=682) I mostly set everything up like the shiftOut tutorial here (http://www.arduino.cc/en/Tutorial/ShiftOut) except instead of single LEDs the 595 pins are going into the 24 pins of the LED matrix.
I want to be able to control this matrix dot by dot, write words, make a smiley face, whatever. I can hook up a pot and with shiftOut(dataPin, clockPin, MSBFIRST, pot); lights will move around...but I don't understand why they do what they do.
In the first 595, the one that goes to the Arduino, i have the 8 pins used for the red columns of the matrix. In the second 595, I have it cascaded into 595 #1 (just like in the shiftOut tutorial) and all those go to the 8 pins for the rows of the matrix. The last 595 goes to the green columns in the matrix. I also set that up just like I set up #2.
The way i thought it would be was that I would give for my value a decimal number that would correspond to a binary number that would control the pins in the 595's. For example if i said value = 2, that would be a 00000010 in binary. Therefore, the 2nd pin in the 595 would go to high. That works; but, if i want to make, say, the third pin in the second 595 go to high AND the 7th pin in the 1st 595 how do i do that? i thought it would simply be 00000100 01000000 or 1088 in decimal...but that doesn't work. i instead get the 7th pin going high in 595 #1 and 595 #3 (??) and i the last pin appears to go high in 595 #2...I have no idea why this is. (I am also doing shiftOut(dataPin, clockPin, MSBFIRST, (value>>8)); if the number is greater than 255)
I hope i'm being clear...I think i'm pretty over my head here...I've been trying to figure this out all day. Any help on how to cascade and control these 595s would be much appreciated. Maybe I'm using the wrong ICs for this job...
Thanks so much!