Mr Kok Lau wrote: > > What kind of time resolution are you looking for? microseconds or > > milliseconds? > > > hopefully around microseconds range (apprx 25 - 60 microsecondS for each > register shift) Hmmm.. Let's see here. Assume you want to generate this bit pattern, but take care of a few other simple matters, such as some state machines and the like. Assume that the pic processor is a mid family part, with interrupts (you would have to be a genius to pull it off in a 5X, unless the pattern is never ending). Using timer0 as an interrupt, and a 20MHz clock, your instruction rate and clock input are 200nS If you wait for the 256 roll, you will interrupt in 51.2uS. If this is not good enough, you can prestuff the timer every interrupt and exit the turnpike every 20 or 30 uS. I would say it looks do-able. I would also work hard to make sure that the ISR routine as the lowest possible max execution time, so that it can fit in the 10-20uS of time between interrupts, with some safety. Last word of advice, wth these time critical applications, specify the fine features of the task very clearly and completely. Maybe even draw some timing diagrams. Then again, although it pains me to say this, you could look at Scenix. (there.. I said it). Chris Eddy