Menu

HPWM and CCP

Help
JANIS
2024-01-27
2024-01-28
  • JANIS

    JANIS - 2024-01-27

    Hello! I need 7 PWM outputs. I want to use HPWM, I don't want Software PWM. I found that the PIC16F18855 that I have in stock has 5 CCP modules and 2 pieces of PWM - PWM6 and PWM7. Using PPS tools, I configured CCP 1-5 to work as PWM outputs, as well as PWM6-7. All 5 CCP outputs work as PWM beautifully, but PWM6 and 7 outputs do not work. I must have misunderstood something? Test code added.

     
  • Anobium

    Anobium - 2024-01-28

    I think this will help.

    C:\GCstudio\gcbasic\demos\Vendor_Boards\MPLAB_Xpress_Board_PIC16F18855\11_Using_PWM_to_control_LED_brightness.gcb

    HPWM ( HPWM6, myFrequency, myDuty , myTimerSelected )

    These PWM require specification of the timer.

    Currently no timer is specifiied.

    HPWM 6, 16, 50
    HPWM 7, 16, 50
    

    to

    HPWM 6, 16, 50,2
    HPWM 7, 16, 50,2
    

    Evan

     
  • JANIS

    JANIS - 2024-01-28

    Thanks Anobium!
    Yess, now working OK!

     
    😄
    1

Log in to post a comment.