page 96
Function
FAST_ANALOG
Library CRxxxx.LIB
Function symbol
Purpose
The function allows the PWM synchronous detection of an
analog value. The result is an average value over a PWM
frequency period.
Parameter
Function inputs
Function output
Description
The analog outputs integrated in the controller can also be used
to measure the current at a PWM channel. The current is
measured via shunt resistors connected externally. In order to
synchronise the scanning of the analog values by the AD
converter with the PWM frequency, use the function
FAST_ANALOG.
The specified PWM channel is scanned by the analog channel
at a rate of 1 ms. The output provides the average value over a
complete PWM period.
Name Data type Description
PWM_
CHANNEL
BYTE monitored PWM channel
ANALOG_
CHANNEL
BYTE measuring analog channel
Name Data type Description
Q WORD average analog value over a PWM period