i'm not a C programmer but it looks like the line that says 4ms delay is your delay between rows. you could try making 259 a smaller number. i think that would get rid of your flicker but may make it even dimmer.