hi everybody,
i'm here again with the sinusoidal PWM, please bear with me,
It seems there were some problems with my compiler but after re-installing it,things work pretty well,i've included the file DT_INTS-14.bas in the folder containing the source code and although there some errors,its a good start to me.
there are few things which are not clear to me from the example ofhttp://www.picbasic.co.uk/forum/cont...-DT-interrupts
How to obtain the correspond value for each step is not clear to me,i want to learn how to create a lookup table the way it is done in the example 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''.
Should i include DT_INTS-18.bas file or DT_INTS-14.bas file?it seems to me they perform different functions!which link will i get DT_INTS-18.bas file?
Finally,is there any other modification i should do in that program that it could work better in pic16f877?
Thank you in advance.
Bookmarks