Instruction manual

AMPDIO DRIVERS
Page 134
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20
chan short: timer/counter channel number within the
chip (0, 1 or 2).
freq float: desired frequency in Hertz.
The frequency must be at least 0.01 Hz.
The maximum frequency is the highest
available internal clock frequency divided by 2.
For cards with clock connection registers, this
is 5000000 Hz.
Returns short: OK
or ERRHANDLE
ERRCHAN
ERRRANGE
Prior Calls registerBoardEx
See Also TCgenerateAccFreq
TCgeneratePulse
6.4.8.5 Generate an Accurate Frequency TCgenerateAccFreq
Generates a square wave of specified frequency accurate to 0.1% using two cascaded
timer/counters. See section 3.1.6 for more details on the Frequency Generation application.
For cards without a Counter Connections Register block (e.g. PC214E) an input clock
frequency of 1 MHz is assumed (4 MHz is assumed for PC27E). This affects the accuracy.
For cards with a Counter Connections Register block an input clock frequency of 10 MHz is
used.
The TCfreeResource function should be used to free up the timer/counter channels for use by
other functions.
i = TCgenerateAccFreq (h, chip, chan, freq)
where h short: board handle as issued by the
registerBoardEx function.
chip short: address offset of timer/counter chip #2.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8