Pulse Width Modulation (PWM) functions are provided in the libraries

LIB/pwm_lib.bas


 
PWM_init Initialise the PWM hardware
PWM_set Set period and duty cycle of the PWM hardware
PWM_on Turn on PWM hardware
PWM_off Turn off PWM hardware