I am working on a project where I need a accurate, stable low to no jitter square wave in the range of 0 to approx 300khz to 400khz. I need to be able to set the frequency with an accuracy of 1 hz steps or better. I would like to use a uController to do the job, the simpler the uC the better, there is not alot of processing power needed for other things, just a few buttons and LED, beeper for I/O, an I2C or SPI pins, channel of basic A/D and possibly D/A.
It only needs a square wave (50% duty cycle) not sine or anything else so I don't think I need anything more complicated such as DDS like this
https://www.qsl.net/zs1ayj/page11.htmI can't seem to get around the problem that at lower frequencies a clock of say 32MHZ is adequate for accurately creating a square wave but at 300khz there just is not enough accuracy there to get 1hz resolution or better, as far as I can figure out. Does anyone have ideas or suggestions or schemes how I might approach this?
thanks
Csquire