Was "RE: I need more hardware PWM outputs!!" > > Use linear interpolation between the lower values in the > > table. The user won't notice if the steps are close enough > > already. Note that a user who knows what he is looking > > for can discern 0.5% light changes in certain ranges > > (8bit da). Another way to remove the tick-tick-tick is to > > slow down the changes, either using external RLC elements > > or in software. > > Allowing you to use a higher resolution PWM below the visual > CFF frequency. > Who said "PWM"? It Ain't Necessarily So. Get the cheapest PIC with internal RC oscillator to be dedicated for this task. Associate two 8-bit counters (RAM locations) and two 8-bit their starting values (RAM locations) with each LED. When first counter is decrementing then output line is high, when second - output line is low. When one counter reaches zero then the other counter is loaded and started. No interrupts. The code is simple and clear. Starting values are to be loaded from an external PIC according to its lookup-table. For lower loads we have 1 on-time and 255 off-time, i.e. ~1/255=0.4% changes. For high loads we have 255 on-time and 1 off-time, i.e. ~1/255=0.4% changes too. I'd use 14-Pin PIC16F630 - US$ 1.30 retail (Ukraine). Or 28-Pin PIC16F72 - US$ 2.30 retail if SPI/I2C is needed to tie up in a bunch few of them. Mike. -------------------------------------------- "When I examine myself and my methods of thought, I come to the conclusion that the gift of fantasy has meant more to me than my talent for absorbing positive knowledge." - Albert Einstein ------------------------------------------- -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads