54
Coyote (BL2500)
Sets a voltage (0 to Vdd) on an analog output channel given a data point on the 1024 clock count cycle.
Call pwmOutConfig() and pwm_init() before using this function. (An exception error will occur
if these functions were not been called previously.)
PARAMETERS
channel
is the PWM output channel to write: 0 for DA0, 1 for DA1
rawdata
is data value (0–1024) for a 1024 clock count cycle. The value may be calculated using the
percent duty cycle value (percentage that is on or high) of the 1024 clock count cycle, for example,
0.25*1024.
RETURN VALUE
0 if successful
SEE ALSO
pwmOutConfig, pwm_init
Sets the voltage of an analog output channel by using the previously set calibration
constants to calculate the cor-
rect data values.
Call pwmOutConfig() and pwm_init() before using this function. (An exception error will occur
if these functions were not been called previously.)
PARAMETERS
channel
is the output channel 0 or 1 to write: 0 for DA0, 1 for DA1
voltage
is the voltage desired on the output channel (0–3.3 V)
RETURN VALUE
None.
SEE ALSO
pwmOut, pwmOutConfig, pwm_init
int pwmOut(unsigned int channel, int rawdata);
void pwmOutVolts(unsigned int channel,
float voltage);