Thalreit Linux
Recent Changes - Search:

 

Lat 47°46'41"N, Lon 12°06'42", JN67BS

Thalreit Project

DDSGenerator

It is described how to interface a DDS generator in the UNIX environment.

Hardware

The DDS generator is a high precision sinus signal generator which can drive frequencies from 0 to 24 MHz. It is controlled by means of RS232 serial line from computing equipment. The DDS generator is based on the AD9835 integrated circuit by Analog Devices.

Further information ( in German language) is available at AK MODUL-BUS Computer. Sample Windows software to drive the DDS generator ( which is based on Visual Basic) can be found at the DDS project page of the Elektronik-Experimentier-Server Elexs.

Technical Specifications

  • frequency range: 0 Hz - 24 MHz
  • signalform: Sinus
  • output signal voltage (Vss): 1,2 V
  • load independent DC signal voltage: 0,7 V
  • supply voltage: 9 V - 13,8 V
  • current consumption: ca. 50 mA
  • computing equipment interface: RS232

ddsctrl

ddsctrl is a piece of C code which is capable to drive the DDS generator from probably any POSIX based operating system. It has been developed on the Linux architecture. At present time the code is a simple rewriting of the Visual Basic code of the DDS project.

Compilation and Running

It is necessary to have a C compiler available. If gcc is used, run


gcc -lm -Wall -O2 -o ddsctrl ddsctrl.c

to compile.

To run ddsctrl simply type


ddsctrl <frequency in Hz>

Screenshot

If the DEBUG switch is turned on, you will see the following output of ddsctrl when setting a frequency of 3 kHz


jahns@eos ddsctrl > ./ddsctrl 3000
ELEXS DDS generator control
f_out   : 3000.000000 (Hz)
fword   : 3eea2
f_test  : 257698.037760
freg0_re_l_lsb: a2
freg0_re_h_lsb: ee
freg0_re_l_msb: 3
freg0_re_h_msb: 0
using /dev/ttyS0
write ctrlwrd ( set sleep, reset=1, clr=1): f800
write ctrlwrd ( freg0_reg_l_lsb): 30a2
write ctrlwrd ( freg0_reg_h_lsb): 21ee
write ctrlwrd ( freg0_reg_l_msb): 3203
write ctrlwrd ( freg0_reg_h_msb): 2300
write ctrlwrd ( sync=0, selsrc=0): 8000
write ctrlwrd ( sleep=0, reset=0, clr=0): c000

The output frequency of the DDS generator should change immediately. To check the output the baudline spectrum analyser software is very handy. The baudline screenshot when setting the DDS generator to 3 kHz by ddsctrl is shown below.

Download

For download of source code see attachments.

ad9835

ad9835 is a GTK application to drive the DDS generator from probably any POSIX based operating system. Its functionality is identical with that of ddsctrl. GTK version >= 2.0 is needed. ad9835 is authored by Hannes Matuschek [ hmatuschek [at] gmail [dot] com ]. Thank you, Hannes.

Compilation and Running

This follows the usual autotools based triple step procedure


% ./configure
% make 
# make install


Screenshot

Download

For download of ad9835 source code see attachments.

Attach:Hardware.DDSGenerator/ad9835-1.1.tar.bz2


Copyright Volker Jahns, 12 Jul 2006

Edit - History - Print - Recent Changes - Search
Page last modified on October 30, 2008, at 02:21 PM