Test Ideas: Signal generator runs on Visual Basic
Generate signals from 1 kHz to 68 MHz with two ICs and a few components.
By William Grill, Riverhead Systems -- Test & Measurement World, 12/1/2009 2:00:00 AM
|
Test applications often call for a clock signal. Rather than tie up a function generator, you can build a programmable clock generator with just two ICs. You can then control the clock generator with a Visual Basic application that handles frequency setting, provides interactive displays, and programs the circuit through the PC’s serial port. (You can use this link to download the software: www.tmworld.com/file/9775-1209_WEB_Idea_app.zip).
The clock generator circuit in Figure 1 (see figure 1, below) uses an LTC6904, a 1-kHz-to-68-MHz programmable oscillator (Ref. 1). It provides frequency accuracy of 1.1% over the full frequency span with sufficient supply voltage. A 9-V battery provides power for the circuit. A 78L05 linear regulator drops the battery voltage to 5 V, which powers the circuit. The circuit adds a Schmitt-trigger output buffer to isolate the LTC6904’s output and increase current drive capacity from about 4 mA to 50 mA.
|
The LTC6904 uses a two-wire I²C protocol for its programming. The software interfaces the serial port to the LTC6904 using the RS-232 DTR (data terminal ready) and RTS (request to send) signals on connector pins 4 and 7, respectively. You can use the software to select the clock generator’s output frequency and select the PC’s serial port (1 through 6).
The LTC6904 is configured with 16 frequency blocks, each with resolution of 1024 steps. The knob at the lower left of the control window (Figure 2) loads the LTC6904 with 100 index steps while the right knob will index the output frequency by a single internal step.
When you change a knob setting, you’ll see the new frequency in the numerical display. When you press the send button, the software will calculate the closest of the 16 frequency blocks and the index value. The code with then send the new frequency data to the LTC6904 through the serial port while displaying the frequency.
To calculate frequency, the software uses this equation:
![]()
where 1 kHz ≤ frequency ≤ 68 MHz. OCT is a four-bit code (0–15) that selects one of the 16 frequency blocks, and DAC is a 10-bit code (0–1023) that selects the frequency within the selected block. The LTC6904 data sheet explains the programming in detail.
![]() Figure 1. A programmable frequency generator IC is the heart of a PC-based clock generator |
| References |
|
-
After trying to get the VB programs for two different project and failing each time, I decided that this is just a glorious waste of my time. In one case the executible did not work because there were files missing, and trying to go to the author did not help, in the other case I could not find the program.
As far as I am concerned, you might not even waste your time with projects like this.
Klaus Meyer - 2010-14-1 18:02:38 EST -
In the spirit of open source, please provide the full source code (the zip file only contains the executable). I would like to better understand the hooks that VB uses to talk to a serial port, that would be useful to me.
James M. Dinsmore - 2010-12-1 09:55:47 EST -
what transistor are you using in the cct? what is vb prog download site and what supporting files used? running macos
albie prinsloo - 2010-12-1 01:39:40 EST -
When I tried to start the extracted app it failed to start. Said support files not availalbe. ??????
Lewis E. Roberts - 2010-6-1 23:24:02 EST -
for any issues or questions please contact the author at: contact@riverheadsystems.com
I can provide VB executables and get you what ever you need to get this running WG
William Grill - 2010-3-1 14:41:08 EST
No related content found.
- 0 rated items found.
Datasheets.com Electronic Parts & Inventory Search
185 million searchable parts
- Part Number
- Description
- Inventory
- Products
- Manufacturers

























