           Users Guide for the Wavelet Analyzer

HARDWARE CONFIGURATION

    The wavelet analyzer program, ANALYZER.EXE, is supplied with
two configuration files, ANALYZER.C0G and ANALYZER.C1G.  The
first file is for use with a Burr-Brown ZPB32 DSP board with a
base address of 0x300.  The second is for use with a ZPB34 DSP
board with a base address of 0x310.  Select the appropriate
configuration file for the DSP board you have and rename it to
ANALYZER.CFG.  The DSP COFF files, ANLYZR32.DSP and ANLYZ32C.DSP,
are for the ZPB32 and ZPB34, respectively.  Only one of these
COFF files are used at any time; the unused COFF file can be
deleted if desired.

    If neither configuration file is appropriate for your needs,
running ANALYZER.CFG without ANALYZER.CFG will result in the
generation of a new configuration file.  You will be prompted for
the board type and its base address.  Once the configuration data
is properly entered, ANALYZER.EXE will proceed with its exection
to the main screen.

    The only commercial DSP boards currently supported are the
Burr-Brown DSP boards mentioned above.  In addition to the DSP
board, a ZPB100 codec board is also required for analog I/O.  The
CODYBOARD is a homemade board I constructed using the AT&T DSP32
and a codec on one IBM PC-AT board.  The Burr-Brown DSP boards
can now be purchased from Intelligent Instrumentation, a Burr-
Brown company.  Their address is:

               Intelligent Instrumentation, Inc.
               1141 West Grant Road, MS131
               Tucson, AZ 85705
               Telephone: (602) 624-2434
               FAX: (602) 623-8965

    The ZPB100 codec board should be jumpered to pass the
incomming audio signal through the input amplifier prior to
entering the codec.  The gain of the input amplifier should be
adjusted so that the maximum voltage at the input of the codec
does not exceed 1.578 volts peak.  Consult the ZPB100 manual for
specific jumper settings.


WAVELET ANALYZER OPERATION

    Once the main screen appears, you will see that there are
thirteen control positions running along the lefthand side of the
display.  The top eight positions control the vertical scale of
the eight input signal and wavelet transform coefficient traces. 
The bottom five positions control the freezing of the display,
the execution of the transform, the selection of alpha and beta,
and the termination of the program.  These thirteen controls are
selected and controlled in the following manner:

Control Selection

  <Up Arrow> - Pressing this key moves the active control selection
               indicator up the screen.  When either the ALPHA or
               BETA control is selected, its entry field is also
               enabled.  Pressing the key during an ALPHA or BETA
               entry aborts the entry, restores the original
               value, and disables the entry field.  Pressing the
               key when the INPUT vertical scale setting control
               is selected causes no action.

  <Down Arrow> - Pressing this key moves the active control
                 selection indicator down the screen.  When
                 either the ALPHA or BETA control is selected,
                 its entry field is also enabled.  Pressing the
                 key during an ALPHA or BETA entry aborts the
                 entry, restores the original value, and disables
                 the entry field.  Pressing the key when the
                 lowest active control is selected (QUIT when the
                 transform is not running, HALT when it is
                 running) causes no action.

  <Page Up> - Pressing this key moves the active control
              selection indicator up to the INPUT vertical scale
              setting control at the top of the screen.  Pressing
              the key during an ALPHA or BETA entry aborts the
              entry, restores the original value, and disables
              the entry field.  Pressing the key when the INPUT
              vertical scale setting control is selected causes
              no action.

  <Page Down> - Pressing this key moves the active control
                selection indicator down to the lowest active
                control on the screen (QUIT when the transform is
                not running, HALT when it is running).  Pressing
                the key during an ALPHA or BETA entry aborts the
                entry, restores the original value, and disables
                the entry field.  Pressing the key when the
                lowest active control is already selected causes
                no action.


Vertical Scale Controls
  <Left Arrow> - Pressing this key increments the vertical scale
                 setting for the selected wavelet transform level
                 or input trace.  The maximum vertical scale is
                 1.0.

  <Right Arrow> - Pressing this key decrements the vertical scale
                  setting for the selected wavelet transform
                  level or input trace.  The mimimum vertical
                  scale is 0.001.


Wavelet Transform Controls
  RUN / HALT - Pressing the <Enter> key toggles running of the
               fast wavelet transform loaded on the DSP board. As
               the transform runs, the input data and the
               transform coefficients scroll across the display. 
               The coefficients scroll at different rates due to
               increasing time dilation at lower levels of the
               transform.

  HOLD / CONTinue - Pressing the <Enter> key toggles freezing of
                    the scrolling display.  Page flipping of the
                    graphics display is suppressed and only the
                    hidden display page is updated.  When
                    scrolling is CONTinued, the display resumes
                    with the image saved on the hidden page, as
                    if the diplay had no been frozen.
               
  ALPHA / BETA - The only keys recognized are the numbers
                 ('0' -'9'), the minus key ('-'), the period key
                 ('.'), the <Backspace> key, and the <Enter> key.
                 The <Backspace> key is used to edit entries into
                 the fields.  The <Enter> key completes the field
                 entry.  If the new value is valid and within
                 range (-  , < ), it is accepted.  A value
                 different from the original value causes
                 calculation and display of the new scaling and
                 wavlet functions.
  
  QUIT - Pressing the <Enter> key when QUIT is selected causes
         termination of the Wavelet Analyzer and return to DOS.


Here are some example values for alpha and beta:

     ALPHA          BETA                  DISCRIPTION
 (equals beta) (equals alpha)  Haar 2-coefficient wavelet,
                                             vanishing 0th moment

  1.047197551        0.0       Daubechies 4-coefficient wavelet,
                                             vanishing 1st moment

  1.3598037324  -0.782106385   Daubechies 6-coefficient wavelet,
                                             vanishing 2nd moment

Note: The greater the number of vanishing moments, the better the
wavelet is capable of reducing energy in the high frequency terms
of the transform coefficiets.


COMPILING THE WAVELET ANALYZER CODE

    The wavelet analyzer C code is written in Turbo C 2.0 and
compiled using the Borland Integrated Development Environment
(IDE).  The assembly language code elements in V592X480.C and
DSP_CTRL.C are generated through the __emit__ facility.  Though
not as clean or transportable as inline assembly or a separate
language module, it does allow compilation within IDE.  Going
this route, I didn't have to learn as much about assembly
language programming or use the Borland command-line compiler
(TCC) either.  Perhaps, in a future version of this software,
I'll bite the bullet and really learn assembler and/or use TCC.

    For those wanting to use TCC or another compiler, I have
provided the Integrated Make project file and the following list
of compiler and optimization switch settings taken from my Turbo
C IDE:

   Calling convention        C
   Instruction set           80186/80286
   Floating point            Emulation
   Default character type    Signed
   Alignment                 Word
   Generate underbars        On
   Merge duplicate strings   On
   Standard stack frame      On
   Test stack overflow       On
   Optimize for              Speed
   Use register variables    On
   Register optimization     On
   Jump optimization         Off

Using this information and the project file should allow the
creation of a make file for TCC.  For those who wish to use
Borland's later compilers, it is necessary to carefully analyze
the compiled code generated by the mix of assembly and C code. 
Those who wish to use C compilers other the Borland's will also
have to translate Borland-specific library calls (including
__emit__) to comparable calls in their complers' libraries.


A BIGGER, BETTER WAVELET ANALYZER?!

    If there is sufficient interest in such a commercial product,
I would like to expand the features of the wavelet analyzer.
These features would include:

        - Larger order wavelets
        - The wavelet packet transform
        - Screen dump facility
        - Signal and transform data capture and storage
        - Support of more DSP boards
        - Greater sampling rates
        - anything else useful for realtime wavelet analysis

Any and all comments and suggestions are welcome.  I can be
reached either via GEnie MAIL as M.CODY1 or by writing
(preferably) or calling me at:

                Sunair Electronics, Inc.,
                3101 SW Third Avenue,
                Ft. Lauderdale, FL 33315-3389
                Telephone: (305) 525-1505

Hope you enjoy the wavelet analyzer and find it a useful tool!


                                                  Mac A. Cody
