Article sections

    Purpose : Controls the PWM Functions of a given PIN

    Using In Your Projects: #include “PIC8Core/core/pwm.h”

    Dependencies: xc.h , stdint.h, PIC8Core.h

    Contains The Following Functions:


    pwmOut(Pin,Duty Cycle Percent) – Set the PWM Output on a given pin along with a duty cycle value in percent.


    pwmOut(PIN0,80) – will set PWM on Pin0 at 80% Duty

    setPWMDutyCycle(Pin, Duty Cycle Percent)  – Changes the PWM duty cycle of a given pin.  pwmOut should be called first to setup pin as PWM output.


    setPWMDutyCycle(PIN0, 50) – changes the duty cycle of PIN0
    to 50%

    in Modules

    Related Articles