>> I need to construct a variable frequency generator. Capable of producing frequencies from a couple of Hz up to around say 1 or 2 Mhz. The accuracy has to be spot on and I mean spot on. If the display say 154Hz then it must be 154Hz and be capable of this for about 10 mins at a time. No glitches whist the PIC runs off to service some interrupt or other housekeeping task. << The accuracy of frequencies produced by a PIC is the accuracy of its oscillator. Specifications like "spot on" are completely useless, because that obviously can't be achieved. You also didn't say what kind of precision you need. Most likely you can't do what you want with a PIC. The PIC can only divide its oscillator value by certain integers to make an output frequency, assuming you can't tolerate any jitter. That gives you very few choices of output frequencies at the high end. To make an accurate and flexible variable frequency generator, you first have to start with a good frequency reference. After that you use a combination of counters to divide the frequency and phase lock loops to multiply the frequency to get the desired output. Another possibility is to use an analog oscillator and a digital circuit with a frequency reference to measure whatever happens to be coming out of the analog oscillator. You really need to be more specific about the requirements. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body