On Wed, 20 Aug 2008 15:56:52 -0400, "Rodent of Unusual Size" said: > I have three strings of LEDs whose brightnesses are to > be controlled with PWM, and each string independently. > The dual inputs are for 'increase brightness' and > 'decrease brightness,' so it's a simple 1/0 input. > > What frequency does the PWM need to be ? > > Not critical, just above visual flicker rate and > with a 0-100% adjustable duty cycle. So you probably don't even need a hardware PWM peripheral, all three channels could be done in a timer interrupt. If you set it for 20000 interrupts per second you could have a resolution of 1 percent and a refresh rate of 200 Hz. With modest cleverness you could probably do 10 times better than that if you really needed to. 100 times better would require excessive cleverness :) So you could do all three channels plus six buttons on your 16F627A with room to spare. Cheerful regards, Bob -- http://www.fastmail.fm - One of many happy users: http://www.fastmail.fm/docs/quotes.html -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist