README for HEGD9 example with 3L parallel C
===========================================

In this directory there are the following files

README		This file
GD9		C	The .C file that has some useful functions defined and then uses multi-threaded operation.
GD9		APP	The parallel C .app file that can be booted directly using 3L's tis server.
MAKE3L	BAT	A batch file to compile the demo for use with Pll C only

FOR USE WITH JUST PARALLEL C
----------------------------

Check your system configuration to find out which comport of the DSP is
connected to the GD1. In the .C file there is a line

#define ANALOGUE_IN     5       /* Comport for the HEGD9 */

which must be changed to reflect the correct comport connection. The demo
can then be built using the make3l batch file and run using "tis gd9" or
with the 3L Windows Server (w32.exe).

The program will first print a hello message, then declare how many
channels of data it has detected. Then it will continue to print the
samples it receives after every 10000 loops.

FOR USE WITH CODE COMPOSER 
--------------------------

The instructions above are still true, except the make3ld batch file must
be used to compile the demo with the -g switch so that the debugging symbols
are included. In order to use Code Composer with Pll C you also need the 3L
Debugger Support Kit (DSK) installed.

If you have copied your demo into the directory c:\hegd9\c4x\3l then you can
start Code Composer and simply open the workspace provided (gd9.wks).
After starting Code Composer you must set the DSP running using the debug
menu's "Run Free" option. You should then go to a DOS window and use

	"tis gd9 -:d"

to start the application. You should see some messages like:-

C:\hegd9\C4x\3l>tis gd9 -:d
relocate -f \2
relocate gd9.tsk MAIN.sym 0x0033e62b 0x8003d296
relocate c40gfs-s.tsk GFS(ROOT).sym 0x8003fe6d 0x8003fa17
relocate: can't open input file c40gfs-s.tsk
Paused - hit ENTER to continue...

then you can go to the Code Composer window and use the file manu's
"load Symbol" option to load the main.sym file. Then use the debug
menus "go main" option, return to the DOS window and hit enter.

The source code should appear in the Code Composer window with a
yellow line at the line starting main. If you run the Code Composer
then printing should start in the Dos box, stopping Code Composer
will stop it again.

Set a breakpoint at the line below the comment

	"Heres where we would..."

and use the view menu to select graph and time/frequency options.
In the options given select start address and set it to ch1_data,
set aquisition buffer size and display data size to 100, and set
the maximum Y-value to be 4096, DC value to 0x800 and DSP data
type to unsigned 32bit integer then click OK.

You can add watch points to some variables, the no_of_channels and
LowIsFirst are interesting ones.

Now every time the breakpoint triggers, the graph and watchpoints
will be updated with the values from channel 1 of the A/D.
Animating will give a continuously updating graph.

NOTICE !
--------
Every time a breakpoint happens the whole of the DSP stops. This means
that the thread reading from  the comport will stop causing the FIFOs
in the data path to overflow. This example uses a flush function to
ensure that all stale data is removed from those FIFOs before taking
real data.  

V 1.0 10-03-2000