>> Can timer2 in a pic18 do what you need? >=20 > I had thought of a PIC as the source, but wasn't sure how I'd go > at higher frequencies The lower end (0-200Hz @ 0.1Hz, PIC =3D 40MHz fosc) would be fairly trivial with timers but at the upper end, 20kHz (40,000 half cycles), one instruction cycle will be 80Hz 10,000,000 / 250 tcyc (25.0us half cycle) =3D 20,000Hz 10,000,000 / 251 tcyc (25.1us half cycle) =3D 19,920Hz Loading a timer with various sequences would get you a frequency that is an average of the loadings, in theory with infinitely small resolution, but at the cost of time to make that average. For example loading with 250 250 250 250 251 would average 250.1666 per half cycle over the 6 iterations, or 19,986Hz You could find the frequencies for which 1 tcyc =3D 0.1Hz or 1Hz and see if that will fit some of your needs 1/f2 - 1/f1 =3D 100ns, where 100ns =3D 0.1Hz and 1/f2 - 1/f1 =3D 100ns where 100ns =3D 1Hz Would still be good up to several kHz (50% duty) but free tcyc for duty cycle variation is going to run out at a fairly low frequency. I've a project based on a 40MHz 18F that manages 1.5% - 100% variation (in 63 steps) at up to 300Hz, doubt I could push it much more than that without reducing the duty cycle steps Joe --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .