Help Understanding 8x8 Matrix with no IC

So, you read the title, of course this is gonna be a n00b question thread so:

Ive seen this video about an 8x8 LED Matrix:

the guy's using some of the pins as ground, and can activate if its open or closed via code.
My problem understanding this is, all of the pins are set to output, and he seems to turn them high to use them as ground? heres the code:

void drawScreen(byte buffer2[]){

// Turn on each row in series
for (byte i = 0; i < 8; i++) {
setColumns(buffer2*); // Set columns for this specific row*

_ digitalWrite(rows*, HIGH);_
_
delay(2); // Set this to 50 or 100 if you want to see the multiplexing effect!_
_ digitalWrite(rows, LOW);*_

* }*

}
void setColumns(byte b) {
* digitalWrite(COL_1, (~b >> 0) & 0x01); // Get the 1st bit: 10000000*
* digitalWrite(COL_2, (~b >> 1) & 0x01); // Get the 2nd bit: 01000000*
* digitalWrite(COL_3, (~b >> 2) & 0x01); // Get the 3rd bit: 00100000*
* digitalWrite(COL_4, (~b >> 3) & 0x01); // Get the 4th bit: 00010000*
* digitalWrite(COL_5, (~b >> 4) & 0x01); // Get the 5th bit: 00001000*
* digitalWrite(COL_6, (~b >> 5) & 0x01); // Get the 6th bit: 00000100*
* digitalWrite(COL_7, (~b >> 6) & 0x01); // Get the 7th bit: 00000010*
* digitalWrite(COL_8, (~b >> 7) & 0x01); // Get the 8th bit: 00000001*

* // If the polarity of your matrix is the opposite of mine*
* // remove all the '~' above.*
}[/quote]

So, is he basically feeding current trough both pins? i dont get it, i really dont.
Of course, im probably just wrong about some basic shit and dont even know it, but, i want to know what is it im not gettin, you know, for science.

Fist of all, please read how to use the forum and go back and change the quote-tags for code-tags :slight_smile:

An output has two states, HIGH and LOW. When it's HIGH (usually 5V on most normal Arduino's) it can source current. When it's LOW (or 0V) it can sink current. People new to electronics tend to only think about the sourcing part. But you might as well connect a led (with resistor, anode) to 5V and connect the other end to a pin. Now it will turn on when the pin is low.

He extends that a bit. You can also connect that led (and resistor...) between two pins. If you make one pin HIGH and the other LOW the led will turn on. The HIGH pin sources current and the LOW pin sinks current.

And when both pins are either LOW or HIGH (doesn't matter) the voltage difference between them is 0V. They are either both 5V (5V - 5V = 0V) or both 0V (0V - 0V = 0V) so the led will turn off.

The rest he does is multiplexing. You can look that up yourself :slight_smile:

The multiplexing i understood after looking at the code like 20 times , but i tought feeding current trough both pins would fuck somethin up.
Thats some useful knowdelge, thanks!