ProblemwithPWMfrequency


Results 1 to 38 of 38

Threaded View

  1. #15
    Join Date
    Oct 2011
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: ProblemwithPWMfrequency

    Thankx HenrikOlsson

    True the problem was due to the simulator was not working properly .Now the code is working fine and I get the correct PWM frequency(5khz) after change the ISIS vasion Thankx for it. But I have the following problem of relating the dutycycle from the theory and that from picdatashetformural.

    From theory (dutycycle=(Time-ON/period) for my case
    case1: AS seen from the scope when I used the above fomural gives 1/2=0.5=50%

    case2: As seen from the scope when I used the above fomural gives 0.1/2=0.05=5%

    how these values(case1 and case2) can be related with 40 and 400 values

    from pic16f877 datasheet PWM_dutycycle= CCPR1L:CCP1CON<5:4>*TOSC*(TMR2 prscale value)

    I 'm confusing how can I relate the value from theory formular and that from datasheet to know that I get the correct results.

    Help me to solve this problems because always these two case confusing me.


    Thankx
    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