>Hi All, > >I am facing a big challenge and before I will go ahead I would like to >ask anybody who has a good idea. >The solution not need to be cost effective. >I need to generate square wave with close to 50% duty cycle, >but quartz precision. >The frequencies are : 400Hz - 4KHz 10Hz steps > 4KHz -- 40KHz 100Hz steps > 40KHz -- 400KHz 1000Hz steps > 400KHz -- 4MHz 10000Hz steps > >I really appreciate any idea. > >Thank You, > >Peter ( schupet@dvp.com ) Perhaps it is overkill for your application but yiu might want to take a look at one of the Numerically Controlled Oscillator (NCO) chips. An application utilizing the HARRIS HSP45102 was described in the December 1997 (issue 89) and January 1998 (issue #90) editions of Circuit Cellar INK, it even uses a PIC16C54. The in this application it is crystal controlled and should be easily adapted to your requirements. HARRIS is at: http://www.harris.com/ HSP45102 data and Applications info is at: http://www.semi.harris.com/data/fn/fn2/fn2810/index.htm Circuitcellar INK is at: http://www.circuitcellar.com cheers, Phil Philip Starbuck (909) 792-7917 "There are three principal ways to lose money. Wine, women, and engineers. While the first two are more pleasant the third is by far the more certain." -- Baron Rothschild ca. 1860