|
@ -107,23 +107,29 @@ ApwmFET_on MACRO |
|
|
setb P1.A_pwm ; set pin to high |
|
|
setb P1.A_pwm ; set pin to high |
|
|
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
ApwmFET_off MACRO |
|
|
ApwmFET_off MACRO |
|
|
anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
BpwmFET_on MACRO |
|
|
BpwmFET_on MACRO |
|
|
setb P1.B_pwm ; set pin to high |
|
|
setb P1.B_pwm ; set pin to high |
|
|
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
BpwmFET_off MACRO |
|
|
BpwmFET_off MACRO |
|
|
anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
CpwmFET_on MACRO |
|
|
CpwmFET_on MACRO |
|
|
setb P1.C_pwm ; set pin to high |
|
|
setb P1.C_pwm ; set pin to high |
|
|
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
CpwmFET_off MACRO |
|
|
CpwmFET_off MACRO |
|
|
anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
All_pwmFETs_Off MACRO |
|
|
All_pwmFETs_Off MACRO |
|
|
anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
@ -132,38 +138,48 @@ AcomFET_on MACRO |
|
|
clr P1.A_pwm ; set pin to low |
|
|
clr P1.A_pwm ; set pin to low |
|
|
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
AcomFET_off MACRO |
|
|
AcomFET_off MACRO |
|
|
anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
BcomFET_on MACRO |
|
|
BcomFET_on MACRO |
|
|
clr P1.B_pwm ; set pin to low |
|
|
clr P1.B_pwm ; set pin to low |
|
|
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
BcomFET_off MACRO |
|
|
BcomFET_off MACRO |
|
|
anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
CcomFET_on MACRO |
|
|
CcomFET_on MACRO |
|
|
clr P1.C_pwm ; set pin to low |
|
|
clr P1.C_pwm ; set pin to low |
|
|
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
CcomFET_off MACRO |
|
|
CcomFET_off MACRO |
|
|
anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
All_comFETs_Off MACRO |
|
|
All_comFETs_Off MACRO |
|
|
anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Set_Pwm_A MACRO |
|
|
Set_Pwm_A MACRO |
|
|
mov P1SKIP, #(NOT(1 SHL A_pwm)); |
|
|
mov P1SKIP, #(NOT(1 SHL A_pwm)); |
|
|
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Set_Pwm_B MACRO |
|
|
Set_Pwm_B MACRO |
|
|
mov P1SKIP, #(NOT(1 SHL B_pwm)); |
|
|
mov P1SKIP, #(NOT(1 SHL B_pwm)); |
|
|
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Set_Pwm_C MACRO |
|
|
Set_Pwm_C MACRO |
|
|
mov P1SKIP, #(NOT(1 SHL C_pwm)); |
|
|
mov P1SKIP, #(NOT(1 SHL C_pwm)); |
|
|
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver |
|
|
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Set_Pwms_Off MACRO |
|
|
Set_Pwms_Off MACRO |
|
|
mov P1SKIP, #P1_SKIP; |
|
|
mov P1SKIP, #P1_SKIP; |
|
|
ENDM |
|
|
ENDM |
|
@ -209,17 +225,24 @@ ENDM |
|
|
|
|
|
|
|
|
Set_LED_0 MACRO |
|
|
Set_LED_0 MACRO |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Clear_LED_0 MACRO |
|
|
Clear_LED_0 MACRO |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Set_LED_1 MACRO |
|
|
Set_LED_1 MACRO |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Clear_LED_1 MACRO |
|
|
Clear_LED_1 MACRO |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Set_LED_2 MACRO |
|
|
Set_LED_2 MACRO |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Clear_LED_2 MACRO |
|
|
Clear_LED_2 MACRO |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Set_LED_3 MACRO |
|
|
Set_LED_3 MACRO |
|
|
ENDM |
|
|
ENDM |
|
|
|
|
|
|
|
|
Clear_LED_3 MACRO |
|
|
Clear_LED_3 MACRO |
|
|
ENDM |
|
|
ENDM |