On Sat, 2006-09-02 at 16:13 -0700, Darren Gibbs wrote: > For my LED-based lighting project, I'm using an 18F1320 to do 8 > channels of 9 bit PWM in software. Check out: http://www.dattalo.com/technical/software/pic/pwm8.asm This is an 8-bit 8 PWM routine that takes 23 cycles per count or 781 Hz on a 20MHz 16F series PIC. An extra bit of dynamic range can be implemented either with a vertical counter (6 extra cycles per count) or by alternating consecutive 8-bit sequences. Both will drop the PWM frequency down to probably somewhere around 200 Hz. Allowing some head room for the midi communication and you may can achieve an effective 120Hz PWM frequency. This will leave nearly half of the CPU available for communications and still achieve flicker free PWM'd LEDs. Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist