3 channel PWM with customize duty cycle


Closed Thread
Results 1 to 40 of 57

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: 3 channel PWM with customize duty cycle

    yes, i remove the pause statement because i think adding it causing the pwm duty longer then the original pwm duty, hence changing my pwm pattern.
    can we actually pause below 1 ms since i know pause statement can only be use for minimum 1ms right??
    correct me if im wrong

    when you tries on the real physical PIC, do you enable the pause statement??
    i will try on real physical PIC later and feedback to you tmrw.

    photoelectirc

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,627


    Did you find this post helpful? Yes | No

    Default Re: 3 channel PWM with customize duty cycle

    Hi,
    The Pause statement won't effect the PWM since it's generated in hardware. If you have Pause 1 you'll basically get 5 periods of each dutycycle value.

    You can Pause with microsecond resolution by using PauseUs (again, it's in the green book....)

    When testing I used 300us and you can see the result in the attached screenshot. This is not a simulation, it's captured on real hardware.
    Attached Images Attached Images  

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts