Instruction manual

Table Of Contents
PC215E Page 92
6.6.8.4 Generate an Accurate Frequency - TCgenerateAccFreq
Generates a square wave frequency accurate to 0.1% using two cascaded timer/counters.
See section 4.2.7 for more details on the Frequency Generation application.
i = TCgenerateAccFreq (h, chip, chan, freq)
where
h Integer. Board handle as issued by function
registerBoard.
chip Integer. Address offset of timer/counter chip
#2. One of the following pre-defined constants
may be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20.
chan Integer. Timer/counter channel number within
the chip (0, 1 or 2). Another timer/counter (chan
- 1) will be used by this function. This
timer/counter may be on the previous chip.
freq Float. Desired frequency, in Hertz.
Returns Integer:
OK
or ERRHANDLE
ERRCHAN
ERRRANGE
Prior Calls registerBoard
See Also TCgenerateFreq