You are on page 1of 1

Interrupt Service Routine

Start

YES Is alpha =
alpha = 0
360

Initialize PWM1,PWM2,PWM3 NO
End of Interrupt

YES
Sector = 1 alpha < 60

Declaration Variable in NO alplha update

Calculation
YES
Sector = 2 alpha < 120
Load PWM module
NO with Duty cycle
Initialize Timer-Interrupt
YES
Sector = 3 alpha < 180
Compute T1 ,T2 and T0
NO
End Main
YES
Sector = 4 alpha < 240
Check Sector 1 to 6
NO

YES NO
Sector = 5 alpha < 300 Sector = 6

You might also like