sinusoidal PWM


Results 1 to 40 of 84

Thread: sinusoidal PWM

Threaded View

  1. #8
    Join Date
    Feb 2011
    Posts
    37


    Did you find this post helpful? Yes | No

    Red face Re: sinusoidal PWM

    Hi,
    thanks for the tip,m trying to modify the example you gave in http://www.picbasic.co.uk/forum/cont...-DT-interrupts so that i can generate a 50Hz sinusoidal PWM signal to control a single phase inverter using pic16f877.If i understand u correctly,in the sine array you jumped four steps to get 128 steps of 8-bit resolution,but how you got the correspond value for each step is not clear to me,i want to learn how to create a lookup table the way you did as i dont know how to create it using excel.what formula was used to get these values from that example?
    ; Set sine "table" in an array
    sineval var byte[32]
    sineval[1] = 128
    sineval[2] = 148
    sineval[3] = 167
    sineval[4] = 185
    sineval[5] = 200 etc.

    Also for 50Hz,PR2 will be loaded with 78 for 20MHz oscillator frequency of 16f877,but i dont how to arrive in determination of the value loaded for variable'' timerone''.

    When i copied the example and try to compile i got the warning 'unable to open include file DT_INTS-18.bas'..what should i do about this?

    Finally,is there any other modification i should do in that program that it could work better in pic16f877?
    Last edited by Ioannis; - 8th May 2011 at 15:33.

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