📄 splxx.inc
字号:
;---------------------------------
SPL11Bx .EQU 1
;---------------------------------
.IFDEF SPL08Ax
.PAGE0
;----------------------------------------------
; I/O configuration for hardware system
;----------------------------------------------
P_00H_IOABCtrl: EQU $0
PortABOutput EQU %00111111
PortAB0Output EQU %00000001
PortAB1Output EQU %00000010
PortAB2Output EQU %00000100
PortAB3Output EQU %00001000
PortAB4Output EQU %00010000
PortAB5Output EQU %00100000
PortAB6Output EQU %01000000
PortAB7Output EQU %10000000
;-------------------------------------------------------------------------------
P_01H_IOEFCtrl: EQU $1
AllPortEFInput EQU %00000000
PortEF0Output EQU %00000001
PortEF1Output EQU %00000010
PortEF2Output EQU %00000100
PortEF3Output EQU %00001000
PortEF4Output EQU %00010000
P_02H_IOAB: EQU $2
P_03H_IOEF: EQU $3
P_04H_DataLatch EQU $4
P_06H_IOPullLowCtrl:EQU $6
PortABEFNormalPull: EQU %00000000
PortEFPullDown: EQU %00011000
PortABPullDown: EQU %00000110
;-------------------------------------------------------------------------
; SleepWakeUp: Sleeping Wake up control (R/W)
; (write 1 for option enable, Write 0 for option disable and also
; Clear the correspondence Hardware flag)
; (Read 1 when the wakeup event is take place)
; b0 : Wake Up when EF Port 8 key changed
; b1 : Wake Up when each time base 2 Hz
; b2 : Wake Up when timer 1 overflow
;-------------------------------------------------------------------------
P_08H_SleepWakeup: EQU $8
WakeUpPortEF: EQU %00000001
WakeUp2Hz: EQU %00000010
WakeUpTimer1: EQU %00000100
WakeUpMask: EQU %00000111
;-------------------------------------------------------------------------------
; Sleep : Write any data to this port to start Sleeping (W)
;-------------------------------------------------------------------------------
P_09H_EnterSleep: EQU $9
P_0BHClockABSource: EQU $0b
T0TimerMode: EQU %00000000
T0CounterMode: EQU %10000000
T0CntIntGate: EQU %00000000
T0CntExtGate: EQU %00001000
T0CntGateT2Hz: EQU %00000000
T0CntGateCK128: EQU %00000100
T0CntExtClock: EQU %00000000
T0CntIntClock: EQU %00000010
T0CntClockCPUCK:EQU %00000000
T0CntClockCLK4K:EQU %00000001
;-------------------------------------------------------------------------------
; C32K : Crystal Oscillator Control (W)
; b5 : 0 -> normal mode, 1 -> Test mode
; b6 : 0 -> Oscillator stronger, 1 -> Weak oscillator
; b7 : 0 -> Oscillator enable, 0 -> Oscillator disable
;-------------------------------------------------------------------------------
P_0CH_C32K: EQU $c
OSC32KTest: EQU %00100000
OSC32KWeak: EQU %01000000
OSC32KStrong: EQU %00000000
OSC32KDisable: EQU %10000000
OSC32KEnable: EQU %00000000
;-------------------------------------------------------------------------------
P_0DHInterrupt: EQU $0D
ExtIntEnable: EQU %00000001
CLK2KIntEnable: EQU %00000010
CLK128IntEnable: EQU %00000100
T2HzIntEnable: EQU %00001000
TimerXIntEnable: EQU %00010000
TimerIntEnable: EQU %00100000
P_40H_ExtIntClear: EQU $40
P_41H_CLK2KIntClear: EQU $41
P_42H_CLK128IntClear: EQU $42
P_43H_T2HzIntClear: EQU $43
P_44H_TimerXIntClear: EQU $44
P_45H_TimerIntClear: EQU $45
P_0AHTimerXSel EQU $0A
;-------------------------------------------------------------------------------
; P_WDOGC: WatchDog counter reset (W)
; This Watchdog clear port must be write druing 2 sec, otherwise system
; will be reset
;-------------------------------------------------------------------------------
P_0FH_WDOGC: EQU $0F
P_10H_Lcd: EQU $10
P_11H_Lcd: EQU $11
P_12H_Lcd: EQU $12
P_13H_Lcd: EQU $13
P_18H_Lcd: EQU $18
P_19H_Lcd: EQU $19
P_1AH_Lcd: EQU $1A
P_1BH_Lcd: EQU $1B
P_25H_Timer0: EQU $25
P_27H_LoadTimer0: EQU $27
P_0BH_ClockABSource: EQU $0B
EnableTimer EQU %10000000
CPU_32K_Clk EQU %00100000
P_1FH_LCDconfig: EQU $1F
LCD_StartScan EQU %00000001
LCD_1_2_Bias: EQU %00000000
LCD_1_3_Bias: EQU %00100000
LCD_4Duty: EQU %01000000
LCD_3Duty: EQU %10000000
LCD_2Duty: EQU %11000000
.ENDIF
.IFDEF SPL081Ax
.PAGE0
;----------------------------------------------
; I/O configuration for hardware system
;----------------------------------------------
P_00H_IOAB_Ctrl: EQU $0
PortABOutput EQU %00111111
PortAB0Output EQU %00000001
PortAB1Output EQU %00000010
PortAB2Output EQU %00000100
PortAB3Output EQU %00001000
PortAB4Output EQU %00010000
PortAB5Output EQU %00100000
PortAB6Output EQU %01000000
PortAB7Output EQU %10000000
;-------------------------------------------------------------------------------
P_01H_IOCD_Ctrl: EQU $01
PortCD123SenseEnable: EQU %00100000
PortCD0SenseEnable: EQU %00010000
PortCDInput: EQU 0
PortCD0Input: EQU 0
PortCD1Input: EQU 0
PortCD2Input: EQU 0
PortCD3Input: EQU 0
PortCDOutput: EQU %00001111
PortCD0Output: EQU %00000001
PortCD1Output: EQU %00000010
PortCD2Output: EQU %00000100
PortCD3Output: EQU %00001000
;-------------------------------------------------------------------------------
P_02H_PortAB: EQU $2
P_03H_PortEF: EQU $3
P_04H_DataLatch EQU $4
P_05H_PortCD: EQU $5
;-------------------------------------------------------------------------------
P_06H_IOPullLowCtrl: EQU $6
PortABEFNormalPull: EQU %00000000
PortEFPullDown: EQU %00011000
PortABPullDown: EQU %00000011
PortCDPullDown: EQU %00000100
PortABB0ToneMode: EQu %00100000
;-------------------------------------------------------------------------------
P_08H_SleepWakeup: EQU $8
WakeUpPortEF: EQU %00000001
WakeUp2Hz: EQU %00000010
WakeUpTimer1: EQU %00000100
WakeUpMask: EQU %00000111
P_09H_EnterSleep: EQU $9
P_0AHTimerXSel EQU $0A
;-------------------------------------------------------------------------------
P_0BH_ClockABSource: EQU $0b
T0TimerMode: EQU %00000000
T0CounterMode: EQU %10000000
T0CntIntGate: EQU %00000000
T0CntExtGate: EQU %00001000
T0CntGateT2Hz: EQU %00000000
T0CntGateCK128: EQU %00000100
T0CntExtClock: EQU %00000000
T0CntIntClock: EQU %00000010
T0CntClockCPUCK:EQU %00000000
T0CntClockCLK4K:EQU %00000001
EnableTimer: EQU %10000000
CPU_32K_Clk: EQU %00100000
;-------------------------------------------------------------------------------
; C32K : Crystal Oscillator Control (W)
; b5 : 0 -> normal mode, 1 -> Test mode
; b6 : 0 -> Oscillator stronger, 1 -> Weak oscillator
; b7 : 0 -> Oscillator enable, 0 -> Oscillator disable
;-------------------------------------------------------------------------------
P_0CH_C32K: EQU $c
OSC32KTest: EQU %00100000
OSC32KWeak: EQU %01000000
OSC32KStrong: EQU %00000000
OSC32KDisable: EQU %10000000
OSC32KEnable: EQU %00000000
;-------------------------------------------------------------------------------
; Ints : interrupt control register (R/W), write 0 to this register will make
; the correspondence interrupt disable, and also clear interrupt harware
; flag.
; (R) for flags of correspondence interrupt is generated.
; b0 : External interrupt source (PortCD.b1 <failing edge>)
; b1 : CLK2K (32768 / 16)
; b2 : CLK128 (32768 / 256)
; b3 : T2Hz (32768 / 16384) when C32K.b5 = 0 (normal)
; T2Hz (32768 / 64) when C32K.b5 = 1
; b4 : TimerX, lcd service mode reload pulse
; (32768 / 128) when LCD_Ctrl.b7($1f) = 0 (Duty4) -> 256 Hz
; (32768 / 256) when LCD_Ctrl.b7($1f) = 1 and C32K.b5 = 0 -> 128 Hz
; (32768 / 2) when LCD_Ctrl.b7($1f) = 1 and C32K.b5 = 1 -> 16384 Hz
; d5 : Timer1 interrupt enable (can define as IRQ or NMI)
; d6 : Timer0 interrupt enable (only IRQ can be configurated)
; d7 : 0 -> Timer1 interrupt as NMI
; 1 -> Timer1 interrupt as IRQ
;-------------------------------------------------------------------------------
P_0DH_Interrupt: EQU $0d
ExtIntEnable: EQU %00000001
CLK2KIntEnable: EQU %00000010
CLK128IntEnable: EQU %00000100
T2HzIntEnable: EQU %00001000
TimerXIntEnable: EQU %00010000
TimerIntEnable: EQU %00100000
P_40H_ExtIntClear: EQU $40
P_41H_CLK2KIntClear: EQU $41
P_42H_CLK128IntClear: EQU $42
P_43H_T2HzIntClear: EQU $43
P_44H_TimerXIntClear: EQU $44
P_45H_TimerIntClear: EQU $45
;-------------------------------------------------------------------------------
; P_WDOGC: WatchDog counter reset (W)
; This Watchdog clear port must be write druing 2 sec, otherwise system
; will be reset
;-------------------------------------------------------------------------------
P_0FH_WDOGC: EQU $0f
P_10H_Lcd: EQU $10
P_11H_Lcd: EQU $11
P_12H_Lcd: EQU $12
P_13H_Lcd: EQU $13
P_14H_Lcd: EQU $14
P_15H_Lcd: EQU $15
P_16H_Lcd: EQU $16
P_17H_Lcd: EQU $17
P_18H_Lcd: EQU $18
P_19H_Lcd: EQU $19
P_1AH_Lcd: EQU $1A
P_1BH_Lcd: EQU $1B
P_1CH_Lcd: EQU $1C
P_1DH_Lcd: EQU $1D
P_1EH_Lcd: EQU $1E
P_1FH_Lcd: EQU $1F
P_20H_Lcd: EQU $20
P_21H_Lcd: EQU $21
P_22H_Lcd: EQU $22
P_23H_Lcd: EQU $23
P_25H_Timer0: EQU $25
P_27H_LoadTimer0: EQU $27
;-------------------------------------------------------------------------------
P_07H_LCDconfig: EQU $07
LCD_StartScan EQU %00000001
LCD_1_2_Bias: EQU %00000000
LCD_1_3_Bias: EQU %00100000
LCD_4Duty: EQU %01000000
LCD_3Duty: EQU %10000000
LCD_2Duty: EQU %11000000
.ENDIF
.IFDEF SPL09Ax
.PAGE0
;-------------------------------------------------------------------------------
; I/O configuration for hardware system
;-------------------------------------------------------------------------------
P_00H_PortCD_Ctrl: EQU $0
PortCDInput: EQU 0
PortCD0Input: EQU 0
PortCD1Input: EQU 0
PortCD2Input: EQU 0
PortCD3Input: EQU 0
PortCDOutput: EQU %00001111
PortCD0Output: EQU %00000001
PortCD1Output: EQU %00000010
PortCD2Output: EQU %00000100
PortCD3Output: EQU %00001000
PortCDPureInput:EQU %01000000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -