Description
Set the period and duty cycle of the PWM hardwareThe resolution of the period is restricted to the most significant 8 bits of the period. The resolution of the duty cycle is restricted to the most significant 10 bits of the period.
The period must be in the range 1 to 4095 (12 bits maximum). The PWM hardware prescalers are selected depending on the size of the period.
Definition
PWM_set(uint period, uint duty_cycle)Library
LIB/pwm_lib.basUsage
On entry:period is the periodOn exit:The period must be in the range 1 to 4095duty_cycle is the duty cycle
The duty cycle must be in the range 1 to periodThere is no return value