Need help with multiplexing coding basics

Hey guys, I haven't been coding very long, and I've looked at some of the posts on here to see what I could find out about how to write code for multiplexing, but I haven't really found what I'm looking for.

I understand how multiplexing works, and how you have to write one pin HIGH on the anode side wile all the other pins are written LOW, and on the cathode side you write all the pins HIGH except for one, and that will turn on the LED that lies at the intersection of the high anode and low cathode.

I'm starting out small with a 3x3 array, and then planning on working up towards an 8x8 using 12 pins (by multiplexing 8 in my rows and columns using transistors) and then possibly using that to make a 4x4x4 LED cube.

I've seen alot of examples using binary to call for the LED you want lit, and I was wondering how exactly you set up your code to use binary, since I haven't seen much of that.

For my 3x3 example, I have my anodes connected to pins 8, 9, and 11 and my cathode pins connected to 2, 3, and 4. Any help is much appreciated :D

Ok, let me break this first code down...

in the code here, the byte stores a value for a number, setting the "col" equal to 0, but what does the led [8] [8] do?

what does it mean by the -1 being a dummy to make the array start at position 1? and what exactly is it initiating with the list of numbers? I would guess that it is initiating the pins, but I know that there aren't 17 pins on the board.

The rows and columns are then initiated so that later it will be easier to set them all to either high or low at the same time, but I'm not sure what it means by rows xx and pins yy on the LED matrix

And then I have no idea what the rest is, but I'm guessing it has something to do with shifting the LEDs to the next row and column so that the text will scroll

alright, cool thanks for your help.

One last thing- I have my anode written HIGH and my cathode written LOW, and my LED won’t light up, but when I turn the LED around (cathode high, anode low) it works fine. Does anyone know what is going on here?

BPoe: One last thing- I have my anode written HIGH and my cathode written LOW, and my LED won't light up, but when I turn the LED around (cathode high, anode low) it works fine. Does anyone know what is going on here?

Nevermind, I must have bought a defective batch off of ebay, because the flat side of my LED is on the anode... maybe thats why I got such a great deal on them haha :P