> > The accuracy has to be spot on and I mean spot on The PIC will stay spot on at whatever frequency you choose for 10 minutes. At higher frequencies though you'll be limited. If you stay with the 877 then the resolution will be 400ns at 20MHz, ie 200ns on, 200ns off, = 2.5MHz at best. And you won't be able to produce any frequency that isn't a multiple of 200ns. The highest frequency will depend on the complexity of the pulse output loop, but assuming a 16-bit counter, perhaps 4-5us execution, and probably not exactly 50%. Top whack for PWM is 208kHz at 5.5 bits resolution How are you planning to change the frequency ? That will have to be built into the loop too. You could change the frequency via switches (that is, dial it up) during power-up after a reset, meaning the pulse routine could be shorter, but that's not going to work if you want a continuously variable output, and it still won't get you anywhere near 1MHz -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body