The 5 values are LED "brightness levels" representing on-time (in clock cycles) during a pulse width modulation loop - one for each of 5 colors. : The bright new idea is to turn all 5 colors on at the same time, and then turn each one off at the appropriate time using timer1 interrupts. There was some discussion along this sort of line some time back, under the heading of fast multi-channel PWM schemes. There were some intersting schemes presented that could be implemented really quickly, but they weren't so much PWM as "ON-time modulation." Things along the lines of: [For N bits of resolution] (for each LED) if bit N is set in brightness, turn on LED else off. wait 2^N cycles (for each LED) if bit N-1 is set in brightness, turn on LED else off. wait 2^(n-1) cycles : (for each LED) if bit 1 is set in brightness, turn on LED else off. wait 2 cycles (for each LED) if bit 0 is set in brightness, turn on LED else off. So each LED ends up on for it's brightness value, and off for 2^N-brightness, but there are multiple pulses corresponding to whether the bits in the brightness are contiguous or not... The early "wait for N cycles" can be done via timer interrupts, and your code gets to do other things. The LSBs might be very close together, and could be straight inline code (this limits the max frequency.) It seemed like a neat idea, but I don't know offhand how many applications will tolerate the weird output waveforms, or how much faster this would be than a highly optimized "real" PWM approach (for instance, see Scott Datallo's "vertical counter" based code...) BillW -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu