There are several posts encompassing a 20 LED charlie and at least one using only 4 PIC pins.

I doubt though you'll find any of them in C and I guarantee you no one will do it for you.