Instruction manual

Table Of Contents
Page
95
PC215E
6.6.9 Digitally- and Voltage-Controlled Oscillator Functions
6.6.9.1 Prepare a Digitally-Controlled Oscillator - TCsetDCO
Implements a digitally controlled oscillator (DCO) which periodically reads a data value from a
digital input channel and generates an external frequency based on the value. The digital input
channel can be 1, 4, 8, 12, 16, or 24-bits wide, as specified by a previous call to function
DIOsetChanWidth. The digital channel must have already been setup as an input with a call to
function DIOsetMode. See section 4.2.9 for more details on the Digitally Controlled Oscillator
application.
i = TCsetDCO (h, diChip, diChan, opChip, opChan, udFreq, udChip, MinF,
MaxF)
where
h Integer. Board handle as issued by function
registerBoard.
diChip Integer. Address offset of the digital input chip.
Use one of the following pre-defined constants:-
PPIX = 0
PPIY = 8
PPIZ = 16
diChan Integer. Digital input channel.
opChip Integer. Address offset of the timer/counter
chip to be used for frequency output. One of the
following pre-defined constants may be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20.
opChan Integer. Frequency output timer/counter
channel number within the chip (0, 1 or 2)
udFreq Float. Update frequency in Hertz.
udChip Integer. Address offset of a timer/counter chip
of which counter 1 will be used to generate the
update interrupts. One of the following pre-
defined constants may be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20.
MinF Float. Output frequency corresponding to DI
data value 0.