Instruction manual

AMPDIO DRIVERS
Page 157
TCsetPWPulse
See Also TCfreePWPulse
TCchangePWPulseDutyCycle
TCchangePWPulsePeriod
6.4.8.30 Free a Programmable Width Pulse Generator TCfreePWPulse
Frees the timer counter resources used by a programmable width pulse generator, as
previously set up by TCsetPWPulse.
SUPPORTED IN VERSION 4.42 ONWARDS.
i = TCfreePWPulse (h, hPWP)
where h short: board handle as issued by the
registerBoardEx function.
hPWP short: programmable width pulse generator
handle, as issued by the TCsetPWPulse
function.
Returns short: OK
or ERRHANDLE
ERRCHAN
Prior Calls registerBoardEx
TCsetPWPulse
See Also TCchangePWPulseDutyCycle
TCchangePWPulsePeriod
TCcontrolPWPulse
6.4.8.31 Set up a Pulse Width Modulated Pulse Train Generator — TCsetPWMTrain
Sets up a continuous pulse-width modulated pulse train on the specified timer channel (the
'pulse' channel) using a hardware-retriggerable one-shot. It sets up a periodic rate generator
on a second timer channel (the 'train' channel) to retrigger the one-shot periodically.
SUPPORTED IN VERSION 4.42 ONWARDS.
The 'train' channel is offset by –2 from the 'pulse' channel. If the 'pulse' channel is timer
channel 0 or 1 on a timer chip, the 'train' channel will be channel 1 or 2 on the next lower timer
chip or on the highest timer chip.
If the board lacks clock connection and gate connection registers, the clock sources must be
wired up manually. The output of the 'train' channel must be wired up manually to the gate
input of the 'pulse' channel.
i = TCsetPWMTrain (h, pulseChip, pulseChan, pulseClock, trainClock,
trainGate, duty, trainFreq)
where h short: board handle as issued by the
registerBoardEx function.
pulseChip short: address offset of timer/counter chip for