I'm making a Game of Life on LED Matrix for my school project.
I'm using a four 8x8 LED Matrix, four buffers, two MCP23018 16 bit port expanders and a 18F2455.
I'm using I²C to send data to the port expanders
The hardware is done so what's left to do is software. This is almost done, I'm just trying to get the I²C right.
I made the attached Flowcode test program to check if I could correctly turn on the lower 128 LEDs ( 16 x 8 ) by enabling each row one at a time and sending 0 through the columns (LEDs go on with 0).
The problem is that I see each row turning on and off.
It doesn't send the data fast enough or there's something else...
I'm currently working with 1MHz, theoretically it should work at 400kHz.
I just have 2 weeks to end this, I didn't start too late, my teammate just got all the hardware done so I couldn't test the program before

I measured with my PC Scope the I²C signal and it's taking 9.95ms before the microcontroller sends another data. That's waaaay too long.
Any ideas on how to speed this ?
PS: I added 4 check variables. This will prevent sending data if that data hasn't changed. This improves the speed a bit, but still not fast enough !
I really (really, really, really, ...) need someones help here, I don't know what else I could do...

Best Regards,
Nicolas L. F.