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?
Bookmarks