PC's printer port controls a frequency synthesizer

Aug. 4, 1997
The idea presented here offers a way to create a simple, yet versatile and stable, frequency synthesizer (sine and square wave). At the heart of the circuit lies an AD9850 DDS chip (see the figure). The...

The idea presented here offers a way to create a simple, yet versatile and stable, frequency synthesizer (sine and square wave). At the heart of the circuit lies an AD9850 DDS chip (see the figure). The synthesizer is controlled through a PC’s printer port (in most cases, the port’s address is 0x378).

The program is interactive. You will be asked to enter values for the lowest and highest frequency, number of points (up to 30,000), and the delay in 1-ms increments between the points. The synthesizer provides continuous scanning—“jumping” from point to point from lowest to highest frequency until any key is pressed. Pressing “n” will result in a return to DOS; any other key will prompt you to enter new parameters.

For a single frequency generator, just enter the same lowest and highest frequencies. Pressing “LEFT ARROW” or “RIGHT ARROW” will decrease or increase the frequency by a value equal to 1/step (fine tuning). Pressing “DOWN ARROW” or “UP ARROW” will decrease or increase the frequency by a value equal to 10/step (coarse tuning). These four keys can be used in any order during the scanning process as well. In that case, the synthesizer becomes a generator with a single frequency. Repeated key pressing will allow you to “walk back and forth” within the region of interest. The current value of the output frequency will be displayed after every change.

Resolution of the frequency setting is 1 Hz (it can be as low as 0.03 Hz). The frequency range is from 1 Hz to 50 MHz (with a 125-MHz clock). Stability is achieved by using a quartz clock. “Hopping” time from one point to another is on a microsecond level. The best performance will be obtained with frequencies less than 1/3 of the clock’s frequency. Theoretically, though, up to 1/2 is allowable (the user is responsible for obeying the Nyquist theory). A C++ program listing is provided.

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!