I added a "1 us" delay and it worked quite well but the wave took longer duration time, the output frequency is 16.6hz instead of 50hz becaus of the delay
I'm using 25 entry and the output should be 50hz (Fpwm = 50 * 25 = 1250 I guess ?) how can I fix that ?
Also for the DTCON I can't get this part I need a 5us dead-time and I'm using (Fosc/4) settings what are the calculations needed for "5-0" bits in DTCON to set such a dead-time ?
For Bruce's Example this is the part I'm talking about :
Duty = 800 ' ~50% PDC2L = Duty.LowByte ' maintain a fixed 50% duty cycle on PWM4,5 PDC2H = Duty.HighByte
But i don't think that I'm going to need that in my case I just was wondering to understand the whole thing what are the LowByte and HighByte ?
Thanks Henrick , I can't find words to describe how much you helped me
Bookmarks