erik wrote: > The maximum frequency would be about 71kHz. That means that I must > evaluate the configuration switches, check a timer/ counter, and turn > on an output, plus execute the rest of the program in about 72 > instructions. (that's if there are no jumps or gotos) That sounds like a 20MHz PIC. > It's becoming pretty clear that I just won't be able to do it. This, Erik, is called "programming". It's actually quite easy once you get the hang of it. ;-) Your mistake is to assume you must do all these things on *every* pass of the timing loop. Once you drop this assumption, you think in terms of getting the timing loop done in a certain number of instructions with a few left over. You now use those instructions do do *part* of the non-critical routines each time you do the timing job. You may either call the frequency generation code as a subroutine regularly through the other code, or use a state-machine dispatcher which returns to the timing code. The PIC is very much "purpose-built" to run isosynchronous code. I presume the timing code will use a phase accumulator type synth? -- Cheers, Paul B.