Instruction manual

AMPDIO DRIVERS
Page 159
GAT_OUTN_2 = 3 (gate from inverted
output of a timer
channel offset by -2
from train channel)
duty double:.proportion of the specified period to
spend with the output low, range 0 to 1.
trainFreq double: desired train frequency in Hz. The
actual frequency will be rounded to an integral
division of the train clock frequency.
The minimum train frequency is the frequency
of the train clock source divided by 65536, or
the frequency of the pulse clock source divided
by 65536, whichever is the greatest. E.g. for
CLK_1KHZ the minimum train frequency is
about 0.01526 Hz. If both the train clock
source and pulse clock source are chosen
automatically, the minimum train frequency is
as for CLK_1KHZ, i.e. about 0.01526 Hz.
The maximum train frequency is the frequency
of the train clock source divided by 2, e.g. for
CLK_10MHZ the maximum train frequency is
5000000 Hz. If the train clock source is chosen
automatically, the maximum train frequency is
as for CLK_10MHZ, i.e. 5000000 Hz.
Returns short: Handle to the pulse width modulated pulse train generator (>= 0).
Use this handle to call the TCfreePWMTrain function when
finished, in order to free up the counter/timers for re-use.
or ERRHANDLE
ERRCHAN
ERRDATA
Prior Calls registerBoardEx
See Also TCfreePWMTrain
TCchangePWMTrainGate
TCchangePWMTrainFreq
TCchangePWMTrainDutyCycle
TCcontrolPWMTrain
6.4.8.32 Change Pulse Width Modulated Pulse Train Generator's Gate TCchangePWMTrainGate
Sets the gate for the pulse width modulated pulse train generator to the specified value. For
example, if the PWM pulse train generator was set up with an initial gate value of GAT_GND
to disable pulse generation, then a gate value of GAC_VCC may be used here to begin
generating pulses at a later time.
SUPPORTED IN VERSION 4.42 ONWARDS.
Has no effect on boards without gate connection registers.
i = TCchangePWMTrainGate (h, hPWMT, trainGate)