On Sun, May 21, 2006 at 09:29:54PM -0700, William Chops Westfield wrote: > > On May 21, 2006, at 8:18 PM, Peter Todd wrote: > > > It gets better too, turns out Atmel has 8 pin chips > > with 4 PWM channels built into them! > > Which one is that? Or did you get tricked into believing > anything called atTINY was only 8 pins? Looks like I got tricked... But it's more subtle than that... I'm looking at the ATtiny85 datasheet. It has two timers, Timer0 and Timer1. Both have two PWM units attached to them. Timer0 has PWM output on OC0A/B and Timer1 has pwm output on OC1A/B as well as an additional two inverted outputs. Sounds great so far. The problem is OC0A/B are assigned to the same pins as OC1A/OC1!A So de.spite having all those outputs, you can't use them at the same time. i2c also happens to use one of those same pins too... Bah! That said, the 14 pin Atmel ATtiny84 does do things right and all 4 PWMs can be used at the same time, assuming I'm reading the datasheet right... 14 pins is a whole lot better than the 28 pin 16f767 which only has three PWM modules. Still has a conflict between i2c and one of the pwm pins though. Of course this is assuming I know how to read datasheets. :) -- pete@petertodd.ca http://www.petertodd.ca -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist