Help! normal clock with the use of led instead of 7-seg.

#define A 9
#define B 8
#define C 7
#define D 6
#define E 5
#define FF 4
#define G 3
#define H 2
#define I 1

// Pins driving common anodes
#define CA1 13
#define CA2 12

// Pins for A B C D E F G, in sequence
const int segs[9] = { A, B, C, D, E, FF, G ,H, I};

// Segments that make each number
const word numbers[10] = { 0b111111111, 0b111111110, 0b111111100, 0b111111000, 0b111110000, 0b111100000,
0b111000000, 0b110000000, 0b100000000, 0b100000000 };

void setup() {
pinMode(A, OUTPUT);
pinMode(B, OUTPUT);
pinMode(C, OUTPUT);
pinMode(D, OUTPUT);
pinMode(E, OUTPUT);
pinMode(FF, OUTPUT);
pinMode(G, OUTPUT);
pinMode(H, OUTPUT);
pinMode(I, OUTPUT);
pinMode(CA1, OUTPUT);
pinMode(CA2, OUTPUT);
}

void loop() {
for (int digit1=0; digit1 < 6; digit1++) {
for (int digit2=0; digit2 < 9; digit2++) {
unsigned long startTime = millis();
for (unsigned long elapsed=0; elapsed < 600; elapsed = millis() - startTime) {
lightDigit1(numbers[digit1]);
delay(5);
lightDigit2(numbers[digit2]);
delay(5);
}
}
}
}

void lightDigit1(word number) {
digitalWrite(CA1, LOW);
digitalWrite(CA2, HIGH);
lightSegments(number);
}

void lightDigit2(word number) {
digitalWrite(CA1, HIGH);
digitalWrite(CA2, LOW);
lightSegments(number);
}

void lightSegments(word number) {
for (int i = 0; i < 9; i++) {
int bit = bitRead(number, i);
digitalWrite(segs*, bit);*

  • }*
    }
    i have this code i have modified it and tried to make it with 9 leds insted of a 7 segment i just cant turn on the 9th led…
    Snapshot_20130306.JPG

Start here

digit2 < 9
i < 9

both stop after 8, so you never get to 9

Shouldn’t one of these be all 0’s as well?
0b110000000, 0b100000000, 0b100000000