|
@ -53,18 +53,9 @@ P0_SKIP EQU 0FFh |
|
|
PWM_ACTIVE_HIGH EQU 0 |
|
|
PWM_ACTIVE_HIGH EQU 0 |
|
|
COMPWM_ACTIVE_HIGH EQU 1 |
|
|
COMPWM_ACTIVE_HIGH EQU 1 |
|
|
|
|
|
|
|
|
Set_Pwm_Polarity MACRO |
|
|
|
|
|
IF FETON_DELAY == 0 |
|
|
|
|
|
mov PCA0POL, #02h ; Pwm inverted |
|
|
|
|
|
ELSE |
|
|
|
|
|
; mov PCA0POL, #03h ; Damping inverted, pwm inverted |
|
|
|
|
|
IF PCA0_POWER_MODULE == PCA0CPM0 |
|
|
|
|
|
mov PCA0POL, #((COMPWM_ACTIVE_HIGH SHL 1) + (1 - PWM_ACTIVE_HIGH)) |
|
|
|
|
|
ELSE |
|
|
|
|
|
mov PCA0POL, #(((1-PWM_ACTIVE_HIGH) SHL 1) + COMPWM_ACTIVE_HIGH) |
|
|
|
|
|
ENDIF |
|
|
|
|
|
ENDIF |
|
|
|
|
|
ENDM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Damping inverted, pwm inverted |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IF FETON_DELAY == 0 |
|
|
IF FETON_DELAY == 0 |
|
|
PCA0_POWER_MODULE EQU PCA0CPM0 |
|
|
PCA0_POWER_MODULE EQU PCA0CPM0 |
|
|