SM 5 BSZ - Weak signal software using Watcom 32 bit C / Assembler
(July 01 1997)

Weak signal software for PC

Since the output audio is produced from the fourier transforms the interleave factor must be at least 2 if no window is used, and with a sine^4 window, the quality becomes reasonable at interleave factors 8 and above.

The program uses no window if the interleave factor is 2, and a sine window when the interleave factor is 4. In this way some feeling for this software may be obtained on slower computers.

Minimum parameters for reasonable performance:
Sampling frequency 4000
FFT size 128

The program should produce a readable signal at very low levels. It probably allows 3dB lower (or more) S/N than a conventional DSP such as Timewave 59+. This program needs a 32 bit computer with floating point hardware. A 486 at 66MHz is probably enough, but the time for the graphics may be critical. By selecting a black and white screen it may be possible to improve the speed of graphics considerably. This very early version is maybe not so straightforward to use, but for the experimenting amateur......

How to use the test program

You need the DSP100.EXE (zip file) and a DOS extender DOS4GW.EXE (zip file) to run the program, you must type: DOS4GW DSP100 at the dos prompt. A file G.BAT, supplied with the .EXE file supplies this command.

When you start the program for the first time, you enter the parameter set-up routine. If you have a modern pentium, just press X to select them. If your computer is too slow the program will stop with a message telling just that (and what to change).

The parameters are saved in SIGPROC.INI and you have to select Set-up from the main menu if you want new parameters. The other option in the main menu is A=Run program.

Connect the output from your radio to the line input of your sound board. It probably has to be a genuine Creative Labs SB16. I have another computer with a compatible board - but it does not behave like the Soundblaster manual says it should.

When the program starts, you see the spectrum in real time like an oscilloscope image. The spectra are time averaged fourier transforms, and there are two, a fast (yellow) and a slow one (green).


There are some parameters that can be changed, and they are indicated at the top of the screen.

The capital letter in each mode tells what character to press to enable change of that particular parameter.

dc Left Use + or - to make the peak at the centre of the spectrum disappear. The program uses complex FFT to save time, and the centre peak is an artefact arising from a DC offset in the A/D converter. Use / or * to make the step length smaller or larger.
dc Right No use yet, for stereo with cross yagis.
Graph gain Use * or / to change the vertical size of the graph. (+ or - for very small steps)
Audio gain Use * or / to change the output sound level. (+ or - for very small steps).
Max audio Maximum audio level. Use + or - to set the maximum sound level for a strong signal. (You may use "Audio gain" to make a weak signal saturate the signal processing - then set the limit volume with "Max audio" and finally set the noise floor to some weal level by stepping "Audio gain down".
Zero freq Centre frequency of signal sent to loudspeaker. Change with + - / *

When a parameter change is selected, the current value is displayed in green in the upper left corner of the screen.

Other keys

S To save currently selected options.
C To toggle between coherent detect and normal filtering.
X Exit.
Horisontal arrows Move cursor to select which frequency to listen to.
Vertical arrows Enable/disable automatic frequency adjustment to follow frequency drift of signal.
Alt Horizontal arrows Shift display horizontally if spectrum too wide to fit on screen.

The numbers on the third line are signal frequency and amplitude.

Source code

The complete source code SRCE100.ZIP is intended to run in its own subdirectory with the Watcom files under a separate directory \WATCOM directly under the root. If the WATCOM header files are placed elsewhere, DSP.MAK has to be changed.

The files are:
MAIN.C Entry and exit routines
BLASTER.C High level set-up routines
GRAPH.C FFT Signal recovery and graphics
HELP.C Some help text
INIT.ASM Low level set-up routines
SBKINT.ASM Interrupt routines
MEM.ASM Global variables
SBK.H Header file for C programs (global variables)
PUBLICS.INC Header file for ASM programs (global variables) DSP.LNK Used by MAKE.EXE, specifies linking of .obj files
A.BAT Command to compile and link everything.
G.BAT Command to execute program with DOS4GW

Tha WATCOM directory needs WPP386.EXE, W32RUN.EXE, WLINK.EXE, WSTUB.EXE WASM.EXE WMAKE.EXE, a subdirectory \LIB for the libraries (CLIB3R,PLIB3R,MATH387R,EMU387,GRAPH) and a subdirectory \H, including \H\SYS for the header files. This is a small sub set of WATCOM, about 4 megabytes.

The code is straight forward, and it operates to a large extent with global variables which should make it relatively easy to manipulate. At the present state the code has a minimum of comments. Since most of it will probably be replaced I have not written much more comments than those I need myself to be able to work with the software.

Code details

The interrupt service routine makes a data reduction that is equivalent to frequency mixing with half the sampling frequency. The data is converted to 16 bit complex pairs ( I/Q ) allowing half the number of points in FFT's with unchanged performance and a significant speed improvement.

The user interface is very primitive. A mouse driver would be a better way to move the cursor.

Liability, Copyright.....

The software on this page is completely my own. It is presented here to be used by anyone interested on his/her own risk. I take no responsibility for any damage that may be caused by malfunction of the software.

I do not claim any copyright. The source code is here to encourage particularly radio amateurs to make their own additions and changes for whatever purpose of their own. If you make your own software from the source code here, please give it a new name of your own - even if you have changed only a single line. Please, change also the menu text in main.c.

To SM 5 BSZ Main Page