Or, you could look up Slow Speed software based PWM and get almost as many channels of PWM for messing with LEDs as your PIC can handle.
I've been able to do 20 RGB LEDs (3 colors each of course) at 152.5Hz (way fast enough to prevent flickering), serial data input/output (using the PIC's hardware modules), key pad scanning, reading an eeprom, housekeeping chores, etc. all using a software PWM scheme based off Timer 0. Works like a champ, no flickering, etc.etc. That's with an 18F at 40Mhz. Use a 16F at 20Mhz, and you'll still be able to get 76.2Hz (again, fast enough to prevent flicker) and still be able to drive a load of software based PWM outputs on an 18pin PIC.
Bookmarks