User’s Manual
65
4.5.7 PWM Outputs
The PWM functions in this section can be used to operate the analog outputs on the
LP3500 model.
Sets the base frequency for the PWM pulses and enables the PWM driver on all four channels. The base
frequency is the frequency without pulse spreading. Pulse spreading (see
pwm_set
) will increase the
frequency by a factor of 4.
PARAMETERS
frequency
is the frequency (in Hz).
RETURN VALUE
Actual frequency set. This will be the closest possible match to the requested frequency.
SEE ALSO
pwmOut
Sets a voltage (0 to VDD on an analog output channel according to the percent duty cycle of the 1024-
clock-count cycle.)
PARAMETERS
channel
is the output channel to write to (0–3).
dutycycle
is the percent duty (or on) cycle value of the 1024-clock-count cycle (i.e., 0.25).
RETURN VALUE
0 if successful
-1 if an invalid channel number is used
-2 if an invalid duty cycle was requested
SEE ALSO
pwmOutConfig
int pwmOutConfig(unsigned long frequency);
int pwmOut(unsigned int channel, float dutycycle);
Summary of Contents for Fox LP3500
Page 1: ...Fox LP3500 C Programmable Single Board Computer User s Manual 019 0111 041029 E ...
Page 6: ...Fox LP3500 ...
Page 14: ...8 Fox LP3500 ...
Page 22: ...16 Fox LP3500 ...
Page 86: ...80 Fox LP3500 ...
Page 120: ...114 Fox LP3500 ...
Page 130: ...124 Fox LP3500 ...
Page 134: ...128 Fox LP3500 ...
Page 138: ...132 Fox LP3500 ...
Page 142: ...136 Fox LP3500 ...
Page 144: ......