|
@ -2443,126 +2443,126 @@ wait_for_comm_wait: |
|
|
comm1_comm2: ; C->A |
|
|
comm1_comm2: ; C->A |
|
|
jb Flag_Pgm_Dir_Rev, comm1_comm2_rev |
|
|
jb Flag_Pgm_Dir_Rev, comm1_comm2_rev |
|
|
|
|
|
|
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
B_Com_Fet_Off ; Turn off com fet |
|
|
|
|
|
A_Com_Fet_On ; Turn on com fet |
|
|
|
|
|
Set_Pwm_C ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
B_Com_Fet_Off |
|
|
|
|
|
A_Com_Fet_On |
|
|
|
|
|
Set_Pwm_C ; Reapply power after a demag cut |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_B ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_B |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
comm1_comm2_rev: ; A->C |
|
|
comm1_comm2_rev: ; A->C |
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
B_Com_Fet_Off ; Turn off com fet |
|
|
|
|
|
C_Com_Fet_On ; Turn on com fet (reverse) |
|
|
|
|
|
Set_Pwm_A ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
B_Com_Fet_Off |
|
|
|
|
|
C_Com_Fet_On |
|
|
|
|
|
Set_Pwm_A ; Reapply power after a demag cut |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_B ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_B |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
; Comm phase 2 to comm phase 3 |
|
|
; Comm phase 2 to comm phase 3 |
|
|
comm2_comm3: ; B->A |
|
|
comm2_comm3: ; B->A |
|
|
jb Flag_Pgm_Dir_Rev, comm2_comm3_rev |
|
|
jb Flag_Pgm_Dir_Rev, comm2_comm3_rev |
|
|
|
|
|
|
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
C_Pwm_Fet_Off ; Turn off pwm fet |
|
|
|
|
|
Set_Pwm_B ; To reapply power after a demag cut |
|
|
|
|
|
A_Com_Fet_On |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
C_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) |
|
|
|
|
|
Set_Pwm_B |
|
|
|
|
|
A_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_C ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_C |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
comm2_comm3_rev: ; B->C |
|
|
comm2_comm3_rev: ; B->C |
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
A_Pwm_Fet_Off ; Turn off pwm fet (reverse) |
|
|
|
|
|
Set_Pwm_B ; To reapply power after a demag cut |
|
|
|
|
|
C_Com_Fet_On |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
A_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) |
|
|
|
|
|
Set_Pwm_B |
|
|
|
|
|
C_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_A ; Set comparator phase (reverse) |
|
|
|
|
|
|
|
|
Set_Comp_Phase_A |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
; Comm phase 3 to comm phase 4 |
|
|
; Comm phase 3 to comm phase 4 |
|
|
comm3_comm4: ; B->C |
|
|
comm3_comm4: ; B->C |
|
|
jb Flag_Pgm_Dir_Rev, comm3_comm4_rev |
|
|
jb Flag_Pgm_Dir_Rev, comm3_comm4_rev |
|
|
|
|
|
|
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
A_Com_Fet_Off ; Turn off com fet |
|
|
|
|
|
C_Com_Fet_On ; Turn on com fet |
|
|
|
|
|
Set_Pwm_B ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
A_Com_Fet_Off |
|
|
|
|
|
C_Com_Fet_On |
|
|
|
|
|
Set_Pwm_B ; Reapply power after a demag cut |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_A ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_A |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
comm3_comm4_rev: ; B->A |
|
|
comm3_comm4_rev: ; B->A |
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
C_Com_Fet_Off ; Turn off com fet (reverse) |
|
|
|
|
|
A_Com_Fet_On ; Turn on com fet (reverse) |
|
|
|
|
|
Set_Pwm_B ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
C_Com_Fet_Off |
|
|
|
|
|
A_Com_Fet_On |
|
|
|
|
|
Set_Pwm_B ; Reapply power after a demag cut |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_C ; Set comparator phase (reverse) |
|
|
|
|
|
|
|
|
Set_Comp_Phase_C |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
; Comm phase 4 to comm phase 5 |
|
|
; Comm phase 4 to comm phase 5 |
|
|
comm4_comm5: ; A->C |
|
|
comm4_comm5: ; A->C |
|
|
jb Flag_Pgm_Dir_Rev, comm4_comm5_rev |
|
|
jb Flag_Pgm_Dir_Rev, comm4_comm5_rev |
|
|
|
|
|
|
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
B_Pwm_Fet_Off ; Turn off pwm fet |
|
|
|
|
|
Set_Pwm_A ; To reapply power after a demag cut |
|
|
|
|
|
C_Com_Fet_On |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
B_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) |
|
|
|
|
|
Set_Pwm_A |
|
|
|
|
|
C_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_B ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_B |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
comm4_comm5_rev: ; C->A |
|
|
comm4_comm5_rev: ; C->A |
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
B_Pwm_Fet_Off ; Turn off pwm fet |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
B_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) |
|
|
Set_Pwm_C |
|
|
Set_Pwm_C |
|
|
A_Com_Fet_On ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
A_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_B ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_B |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
; Comm phase 5 to comm phase 6 |
|
|
; Comm phase 5 to comm phase 6 |
|
|
comm5_comm6: ; A->B |
|
|
comm5_comm6: ; A->B |
|
|
jb Flag_Pgm_Dir_Rev, comm5_comm6_rev |
|
|
jb Flag_Pgm_Dir_Rev, comm5_comm6_rev |
|
|
|
|
|
|
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
C_Com_Fet_Off ; Turn off com fet |
|
|
|
|
|
B_Com_Fet_On ; Turn on com fet |
|
|
|
|
|
Set_Pwm_A ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
C_Com_Fet_Off |
|
|
|
|
|
B_Com_Fet_On |
|
|
|
|
|
Set_Pwm_A ; Reapply power after a demag cut |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_C ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_C |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
comm5_comm6_rev: ; C->B |
|
|
comm5_comm6_rev: ; C->B |
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
A_Com_Fet_Off ; Turn off com fet (reverse) |
|
|
|
|
|
B_Com_Fet_On ; Turn on com fet |
|
|
|
|
|
Set_Pwm_C ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
A_Com_Fet_Off |
|
|
|
|
|
B_Com_Fet_On |
|
|
|
|
|
Set_Pwm_C ; Reapply power after a demag cut |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_A ; Set comparator phase (reverse) |
|
|
|
|
|
|
|
|
Set_Comp_Phase_A |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
; Comm phase 6 to comm phase 1 |
|
|
; Comm phase 6 to comm phase 1 |
|
|
comm6_comm1: ; C->B |
|
|
comm6_comm1: ; C->B |
|
|
jb Flag_Pgm_Dir_Rev, comm6_comm1_rev |
|
|
jb Flag_Pgm_Dir_Rev, comm6_comm1_rev |
|
|
|
|
|
|
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
A_Pwm_Fet_Off ; Turn off pwm fet |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
A_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) |
|
|
Set_Pwm_C |
|
|
Set_Pwm_C |
|
|
B_Com_Fet_On ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
B_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_A ; Set comparator phase |
|
|
|
|
|
|
|
|
Set_Comp_Phase_A |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
comm6_comm1_rev: ; A->B |
|
|
comm6_comm1_rev: ; A->B |
|
|
clr IE_EA ; Disable all interrupts |
|
|
|
|
|
C_Pwm_Fet_Off ; Turn off pwm fet (reverse) |
|
|
|
|
|
|
|
|
clr IE_EA |
|
|
|
|
|
C_Pwm_Fet_Off ; Turn off pwm fet (Necessary for EN/PWM driver) |
|
|
Set_Pwm_A |
|
|
Set_Pwm_A |
|
|
B_Com_Fet_On ; To reapply power after a demag cut |
|
|
|
|
|
|
|
|
B_Com_Fet_On ; Reapply power after a demag cut (Necessary for EN/PWM driver) |
|
|
setb IE_EA |
|
|
setb IE_EA |
|
|
Set_Comp_Phase_C ; Set comparator phase (reverse) |
|
|
|
|
|
|
|
|
Set_Comp_Phase_C |
|
|
ret |
|
|
ret |
|
|
|
|
|
|
|
|
|
|
|
|
|
|