Your spec of 0 to 500 kHz is pretty tough for a discrete circuit to realize (in a repeatable fashion) such that you know what the current frequency (and perhaps duty-cycle).
I'd suggest buying a good bench-top frequency generator as one solution ~$100-200.
Another way is to buy a AD9833 Direct Digital Synthesizer module (~$5 on eBay) and run it using a PIC or Arduino micro-controller board.
That low-cost AD9833 DDS can really deliver (0.1 Hz resolution) from 0 to 12.5 MHz, especially in a Square wave output. I use them for my projects with an Arduino 2560.
I realize this approach is way beyond using a few discrete chips. However, if you what you need MUST be repeatable and accurate, its likely worth considering.
hth