Hey, long time no post for me...
Please see my thread on multiple PWM generation for a PIC...
Its a small algorithm for generating PWM using interupts and using few resources. But, it all depends on your app, PWM period, max/min mark/space ratio, resolution etc.. My design is only meant for 3 PWM's running up to 2Khz, with 8-bit resolution, and only uses one timer (and roughly 5% of CPU time per second).
Microchip have a datasheet for software PWM, several algorithms are shown, depending on the requirements (peroid, mark/space, yada yada yoda).
**broken link removed**
microchips forum...
**broken link removed**
So, my advice (probably not worth anything, but its doesn't hurt).
As far as I know, you need 8 PWM's, each being 10+ bits res.
1. Now, there are some IC's that can do this, specific for this purpose. They may only be designed to drive LED's, but all that means is that you need MOSFET drivers for each servo, no biggie.
2. I'm pretty sure that there are indeed some microcontrollers that have 8 hardware PWM's, of 10+ bit res. Unfortunately, these tend to be at the 'upper end', 16-bit devices, fairly expensive (except maybe the philips, and dsPIC chips). Generally, as you go up the range in devices, they start adding more and more things (like PWM's, more UART's, I2C etc..) and the price goes up. Depends on your 'restrictions'. Can you write programs for any microcontroller? or are you 'loyal' to one particular family? What micro's are available to you? Programming, price all have to be taken into account.
3. The tricky option. Write your own clever code for a cheap, easy-to-get micro.
Now, as far as I can see, you haven't mentioned what else this micro will be doing, apart from generating PWM's. So, why not just dedicate one cheap micro for this purpose? It can be interfaced with SPI/I2C, or even a parallel interface that won't hinder your PWM too much. So, say you've got a PIC16F628A, at full pelt, it runs at 20MHz (28Mhz with some possible glitches). Now, the only thing it does is generate PWMs, with that speed I reckon you could do that in spades, with room to spare. Unfortuneately, you want >10 bits - tricky. (you could always get a dsPIC, which are 16-bit devices, so each register is 16 bits, meaning, one register for each PWM, makes life a lot easier). Theres a common algorithm using a register for each PWM, and a 'counter' register. All you do is, on an interupt, decrement each of these registers, when a register reaches 0, you turn off its assigned pin. When the counter (determines your PWM period) reaches zero, you reset all the pins, and reload in the PWM values. I've done it, with and without an interupt, the best thing about it is, adding more PWM channels doesn't really make a difference to the code size, you are simply limited by the available pins you have. 8 shouldn't be a problem.
The resolution, however, will be. for an 8-bit micro, you'll need two registers for 10+ bit res. And decrementing becomes a tad more difficult (decrement one register, till it reaches 0, then start decrementing the LSbyte untill it reaches zero.
Because you do this (2^resolution) per period, every time you 'add' a line of code to it, you are effectively adding (2^resolution, 1024 for 10 bit)) instructions per period. Now, if your PWM is 2Khz, thats 2000*1024 = 2048000 extra instructions executed per second.
ok, well I'm ranting, its a tricky tihng to do, and you'll probably be better off simply spending more money on a chip that does it all for you. But I'm convinced that there are easy and effective ways to do things.
Good Luck,
BuriedCode.