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
    setPWMDutyCycle


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

    Example(s):

    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.

    Example(s):

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

    in Modules

    Related Articles