Instruction manual

AMPDIO DRIVERS
Page 166
Prior Calls registerBoardEx
See Also TCgetExtFreq
6.4.9.4 Multiply an External Frequency TCmultiplyFreq
Measures an external signal’s frequency, then generates another signal whose frequency is
the external frequency multiplied by a specified number. N.B. this function is not on-going, and
must be called at a regular interval to keep the generated frequency tracking the external
signal. Note that the output signal will be a square wave. See section 3.1.7 for more details on
the Frequency Multiplication application.
i = TCmultiplyFreq (h, ipChip, ipChan, opChip, opChan, factor)
where h short: board handle as issued by the
registerBoardEx function.
ipChip short: address offset of the timer/counter chip
on which the input frequency will be measured.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20
ipChan short: input timer/counter channel number
within the chip on which to perform the
frequency measurement (0, 1 or 2). Another
timer/counter (ipChan2) will also be used to
provide the gate signal. This may be on the
previous chip.
opChip short: address offset of the timer/counter chip
on which to generate the output frequency.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20
opChan short: output timer/counter channel number
within the chip (0, 1 or 2).
factor float: multiplication factor.
Returns short: OK
or ERRHANDLE
ERRCHAN
ERRRANGE