Arduino and LED Matrix

Hello all. I'm a beginner and I'm trying to make an LED matrix output the string FREE UYGHUR! using the Arduino. However, for some reason the letters F, both R's and the ! do not light up correctly. The problem isn't the pixels themselves because other letters use the same pixels and they light up correctly. I'd appreciate any help on determining why these letters don't light up.

Here is the code:

// 2-dimensional array of row pin numbers:
const int rownum[8] = {
10,12,15,17,2,4,6,8 };
// 2-dimensional array of column pin numbers:
const int colnum[8] = {
11,14,16,18,3,5,7,9 };

float timeCount = 0;

int f[8][8] = {
{0,0,1,1,1,1,1,0},
{0,0,1,0,0,0,0,0},
{0,0,1,0,0,0,0,0},
{0,0,1,1,1,1,1,0},
{0,0,1,1,1,1,1,0},
{0,0,1,0,0,0,0,0},
{0,0,1,0,0,0,0,0},
{0,0,1,0,0,0,0,0}};

int r[8][8] = {
{0,0,1,1,1,1,0,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,1,1,1,0,0},
{0,0,1,1,1,0,0,0},
{0,0,1,0,0,1,0,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,0,1}};

int e[8][8] = {
{0,0,1,1,1,1,1,0},
{0,0,1,0,0,0,0,0},
{0,0,1,0,0,0,0,0},
{0,0,1,1,1,1,1,0},
{0,0,1,1,1,1,1,0},
{0,0,1,0,0,0,0,0},
{0,0,1,0,0,0,0,0},
{0,0,1,1,1,1,1,0}};

int u[8][8] = {
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,0,1,1,1,0,0}};

int y[8][8] = {
{0,1,0,0,0,0,0,1},
{0,0,1,0,0,0,1,0},
{0,0,0,1,0,1,0,0},
{0,0,0,0,1,0,0,0},
{0,0,0,0,1,0,0,0},
{0,0,0,0,1,0,0,0},
{0,0,0,0,1,0,0,0},
{0,0,0,0,1,0,0,0}};

int g[8][8] = {
{0,0,1,1,1,1,0,0},
{0,1,0,0,0,0,1,0},
{0,1,0,0,0,0,0,0},
{0,1,0,0,0,0,0,0},
{0,1,0,0,0,1,1,1},
{0,1,0,0,0,0,1,0},
{0,1,0,0,0,0,1,0},
{0,0,1,1,1,1,0,0}};

int h[8][8] = {
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,1,1,1,1,0},
{0,0,1,1,1,1,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,1,0,0,0,1,0}};

int x[8][8] = {
{0,0,0,1,1,0,0,0},
{0,0,0,1,1,0,0,0},
{0,0,0,1,1,0,0,0},
{0,0,0,1,1,0,0,0},
{0,0,0,1,1,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,1,1,0,0,0},
{0,0,0,1,1,0,0,0}};

int blank[8][8] = {
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0}};

void setup() {
Serial.begin(9600);
// initialize the I/O pins as outputs:

// iterate over the pins:
for (int thisPin = 0; thisPin < 8; thisPin++) {
// initialize the output pins:
pinMode(colnum[thisPin], OUTPUT);
pinMode(rownum[thisPin], OUTPUT);
// take the col pins (i.e. the cathodes) high to ensure that
// the LEDS are off:
digitalWrite(colnum[thisPin], LOW);
digitalWrite(rownum[thisPin], HIGH);
}

}

void loop() {
// This could be rewritten to not use a delay, which would make it appear brighter
delay(5);
timeCount += 1;
if(timeCount < 200) {
drawScreen(f);
} else if (timeCount < 230) {
// do nothing
} else if (timeCount < 400) {
drawScreen(r);
} else if (timeCount < 430) {
// nothing
} else if (timeCount < 600) {
drawScreen(e);
} else if (timeCount < 630) {
// nothing
} else if (timeCount < 800) {
drawScreen(e);
} else if (timeCount < 830) {
// nothing
} else if (timeCount < 1000) {
drawScreen(u);
} else if (timeCount < 1030) {
// nothing
} else if (timeCount < 1200) {
drawScreen(y);
} else if (timeCount < 1230) {
// nothing
} else if (timeCount < 1400) {
drawScreen(g);
} else if (timeCount < 1430) {
// nothing
} else if (timeCount < 1600) {
drawScreen(h);
} else if (timeCount < 1630) {
// nothing
} else if (timeCount < 1800) {
drawScreen(u);
} else if (timeCount < 1830) {
// nothing
} else if (timeCount < 2000) {
drawScreen(r);
} else if (timeCount < 2030) {
// nothing
} else if (timeCount < 2200) {
drawScreen(x);
} else if (timeCount < 2230) {
// nothing
} else {
// back to the start
timeCount = 0;
}
}

int row(int i) {
if(i == 1) {
return 10;
} else if (i == 2) {
return 12;
} else if (i == 3) {
return 15;
} else if (i == 4) {
return 17;
} else if (i == 5) {
return 2;
} else if (i == 6) {
return 4;
} else if (i == 7) {
return 6;
} else if (i == 8) {
return 8;
}
}

int col(int i) {
if(i == 1) {
return 11;
} else if (i == 2) {
return 14;
} else if (i == 3) {
return 16;
} else if (i == 4) {
return 18;
} else if (i == 5) {
return 3;
} else if (i == 6) {
return 5;
} else if (i == 7) {
return 7;
} else if (i == 8) {
return 9;
}
}

void drawScreen(int character[8][8]) {
for(int j = 0; j < 8; j++) {
// Turn the row on
int rowNumber = j + 1;
digitalWrite(row(rowNumber), LOW);
for (int k = 0; k < 8; k++) {
// draw some letter bits
int columnNumber = k + 1;
if(character[j][k] == 1) {
digitalWrite(col(columnNumber), HIGH);
}

digitalWrite(col(columnNumber), LOW);
}
digitalWrite(row(rowNumber), HIGH);
}
}

Video showing output here.

The problem isn't the pixels themselves because other letters use the same pixels and they light up correctly.

So why is this in the hardware section, it sounds like a software problem to me.

Go to the bit that defines your letters that are going wrong and change the bits so you get an understanding of what you are doing. Then it will all drop into place where you have made the error.

Yeah, I agree that it is a software problem not a hardware problem, sorry about that. I've tried changing the pixels around and it doesn't help me isolate the problem. Like I said the F, R's and ! don't display correctly, but if I change every character in the drawScreen() statements to F's I will get a correct display of 11 F's. If I change the last 4 characters to R's, it displays correctly as it should: F R E E U Y G R R R R. It's not the way the characters are defined that is the problem.

You need to describe what LED matrix you have and how it is wired up. You also need to post code using the # icon in the post box.

but if I change every character in the drawScreen() statements to F's I will get a correct display of 11 F's

No that is not the way to isolate it as it gives you little information.
In your draw screen routine the first thing you do is turn the row on. That is wrong. You should turn it off, do the setting up of the bits and then turn it on.

I am using this LED Matrix: http://www.sparkfun.com/products/759
The way I wired it was the same way this guy on this blog wired his: Arduino – 8×8 LED Matrix – Duck's Tech Blog

I connected the pins 1, 2, 3, 4, 21, 22, 23, 24 (rows 1-8 respectively) on the LED Matrix to pins 10, 12, 15, 17, 2, 4, 6, 8 on the Arduino. I connected the pins 20, 19, 18, 17, 16, 15, 14, 13 (red LED columns 1-8) to pins 11, 14, 16, 18, 3, 5, 7, 9 on the Arduino.