> > > > Hope you guys understand my fuzzy explanation... > > I'm afraid not...
I was sure :) > But with a 4017, you can 'fan out' from one ccp-output pin to 9 > servo's (the 10th state is used for the the reminder of 20 ms) and > this is the second-best option. OK > The best would be without additional > hardware and I think you can accomplish as suggested: use a timer > interrupt for each pulse and poll the uart and i2c.The uart routine is > already there and the i2c slave sw only needs minor changes (do not > enable interrupts and remove 'pragma interrupt'). There's something I've missed. If interrupts are used for PWM, and if polling is used for usart and i2c, then we may miss commands ? Or maybe polling is done within a interrupts, as you have mentioned ? This would give: - ISR PWM: deal with 8 x PWM signals, every 20ms - ISR comm.: interrupts every 2µs, then poll usart/i2c Is that what you mean ? Another question... When you say, about interrups and PWM "set the output high and program a timer to generate an interrupt when the desired time has elapsed", does this mean, as a consequence, that the whole cycle won't be 20ms long ? Ex: when all 8 servos are at 50%, the cycle will last ~ 10ms. I guess this is not a problem when it's shorter than 20ms, but, just in case, we may add "padding" time, to complete the 20ms. > The avrfreaks discussion of more then 9 servo's is academic IMHO - if > you can afford to buy more then 9 servo's, buy yourself an other 16f88 > too... Sure, but it would be all centralized on a single board. Usage is probably easier. Cheers, Seb -- Sébastien Lelong http://www.sirloon.net http://sirbot.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
