📄 splxx.inc
字号:
PortCDPullDown: EQU %00000000
PortCDBufferOut:EQU %00000000
PortCDOpenDrain:EQU %01000000
PortCDFloat: EQU %01000000
P_PortEF_Dir_Ctrl: EQU $6
PortEFOutput EQU %00111111
PortEF0Output EQU %00000001
PortEF1Output EQU %00000010
PortEF2Output EQU %00000100
PortEF3Output EQU %00001000
PortEF4Output EQU %00010000
PortEF5Output EQU %00100000
AllPortEFInput EQU %00000000
P_04H_PortCD: EQU $4
P_05H_PortEF: EQU $5
P_05H_PortEFLatch EQU $5
P_35H_PortEF_ConfigCtrl: EQU $35
PortEFPullH_L: EQU %00000000
PortEFHiImpedance: EQU %00111111
PortEFNormalOutput: EQU %00000000
PortEFODNOutput: EQU %00111111
;-------------------------------------------------------------------------------
; WakeUpCtrl: 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_WakeUpCtrl: EQU $8
WakeUpPortEF: EQU %00000001
WakeUp2Hz: EQU %00000010
WakeUpTimer0: EQU %00000100
WakeUp16Hz: EQU %00001000
WakeUpMask: EQU %00001111
;-------------------------------------------------------------------------------
; Sleep : Write any data to this port to start Sleeping (W)
;-------------------------------------------------------------------------------
P_09H_SleepPort: EQU $9
P_0AH_Time_Base EQU $A
P_0BH_CounterCtrl: EQU $0b
TimerEnable: EQU %10000000
TimerDisable: EQU %00000000
Tm0CountTm1: EQU %00100000
Tm0CountROsc: EQU %00000000
Tm0CounterMode: EQU %00010000
Tm0TimerMode: EQU %00000000
Tm0Src1AsCDB1: EQU %00000000
Tm0Src1AsVDD: EQU %00000100
Tm0Src1AsTimeBaseH: EQU %00001000
Tm0Src1AsCLK128: EQU %00001100
Tm0Src2AsCDB0: EQU %00000000
Tm0Src2AsVdd: EQU %00000001
Tm0Src2AsROsc: EQU %00000010
Tm0Src2AsCLK32: EQU %00000011
;-------------------------------------------------------------------------------
; 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_C32OSC_Ctrl: EQU $c
OSC32KStrong: EQU %00000000
OSC32KDisable: EQU %10000000
OSC32KEnable: EQU %00000000
;-------------------------------------------------------------------------------
P_0DH_Ints: EQU $0d
ExtIntEnable: EQU %00000001
CLK2KIntEnable: EQU %00000010
CLK128IntEnable:EQU %00000100
T2HzIntEnable: EQU %00001000
T16HzIntEnable: EQU %00010000
T8HzIntEnable: EQU %00010000
Timer0OverFlowIntEnable EQU %01000000
;-------------------------------------------------------------------------------
P_0EH_CPUClock_Ctrl EQU $0e
Froscdiv2 EQU %00000000
Froscdiv4 EQU %00000001 ;Default
Froscdiv8 EQU %00000010
Froscdiv16 EQU %00000011
;-------------------------------------------------------------------------------
; P_WDOGC: WatchDog counter reset (W)
; This Watchdog clear port must be write druing 1 sec, otherwise system
; will be reset
;-------------------------------------------------------------------------------
P_0FH_WatchDogClear EQU $0F
P_1AH_InterruptClear EQU $1A
;-------------------------------------------------------------------------------
P_36H_Melody_Control EQU $36
MelodyCtrlEnable: EQU %00010000
MelodyCtrlDisable: EQU %00000000
MelodyToneOutput1K: EQU %00000000
MelodyToneOutput2K: EQU %00000001
MelodyToneOutput4K: EQU %00000010
MelodyTimerOverflowdiv2: EQU %00000011
P_10H_Timer0L: EQU $10
P_11H_Timer0H: EQU $11
P_12H_LoadTimer0: EQU $12
P_18H_LCDCtrl: EQU $18
LCD_Normal EQU %00000000
LCD_AllON EQU %00000100
LCD_AllOFF EQU %00001000
LCD_DisplayOFF EQU %00001100
LCD_NormalScan: EQU %00000000
LCD_FastFrameScan: EQU %00010000
LCD_1_2_Bias: EQU %00000000
LCD_1_3_Bias: EQU %00100000
LCD_5Duty: EQU %00000000
LCD_4Duty: EQU %01000000
LCD_3Duty: EQU %10000000
LCD_2Duty: EQU %11000000
P_20H_LcdBuf_Start EQU $20
.ENDIF
.IFDEF SPL10Ax
.PAGE0
;-------------------------------------------------------------------------------
; I/O configuration for hardware system
;-------------------------------------------------------------------------------
P_00H_Port_Ctrl: EQU $0
PortABInput: EQU 0
PortABOutput: EQU %00110000
PortABHInput: EQU 0
PortABHOutput: EQU %00100000
PortABLInput: EQU 0
PortABLOutput: 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
PortCDPureInput:EQU %01000000
PortCDPullDown: EQU %00000000
PortCDBufferOut:EQU %00000000
PortCDOpenDrain:EQU %01000000
PortCDFloat: EQU %01000000
P_02H_PortAB_Data: EQU $2
P_03H_PortCD_Data: EQU $3
P_04H_PortEF_Data: EQU $4
P_04H_Latch_Data: EQU $4
;-------------------------------------------------------------------------------
; AudPL: Pulse Width Modulation / Pull Low Configuration (W)
; b0: 0, PortEF Normal Pull Low Resistor 50K
; 1, PortEF Additional Pull Low Resistor 2.5 K
; b6: 0 tone multiply port $1E to envolpe
; 1, SqureToneMode: pure square wave forme
; b7: 0, Dac out disable
; 1, Dac out enable
;-------------------------------------------------------------------------------
P_06H_AudPL: EQU $6
PortEFNormalPull:EQU %00000000
PortEFPullDown: EQU %00000001
PWMDisable: EQU %00000000
EnvolpeToneMode EQU %00000000
SqureToneMode EQU %01000000
PWMEnable: EQU %10000000
;-------------------------------------------------------------------------------
; Sleep_WakeUp_Source_Ctrl: 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 TimeBaseL 2Hz/ 1Hz depend on P_TimeBaseCtrl(0A)
; b2 : Wake Up when timer 0 overflow
; b3 : Wake Up when TimeBaseH coming
; (TimeBaseH is 4Hz, 8Hz, 16Hz, 32Hz depend on P_TimeBaseCtrl(0AH))
; b4..b7: reserved
;-------------------------------------------------------------------------------
P_08H_WakeUp_Source_Ctrl: EQU $8
WakeUpPortEF: EQU %00000001
WakeUp2Hz: EQU %00000010
WakeUpTimer1: EQU %00000100
WakeUpMask: EQU %00000111
;-------------------------------------------------------------------------------
P_09H_Sleep_Start: EQU $9
P_0BH_Counter_Ctrl: 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_Ctrl : 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_Ctrl: EQU $c
OSC32KTest: EQU %00100000
OSC32KWeak: EQU %01000000
OSC32KStrong: EQU %00000000
OSC32KDisable: EQU %10000000
OSC32KEnable: EQU %00000000
;-------------------------------------------------------------------------------
; INTCtrl : 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 : LCDL, 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
; d6 : Timer0 interrupt enable (only IRQ can be configurated)
;-------------------------------------------------------------------------------
P_0DH_INTCtrl: EQU $0d
ExtIntEnable: EQU %00000001
CLK2KIntEnable: EQU %00000010
CLK128IntEnable: EQU %00000100
T2HzIntEnable: EQU %00001000
LCDLIntEnable: EQU %00010000
Timer0IntEnable: EQU %01000000
;-------------------------------------------------------------------------------
; 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
;-------------------------------------------------------------------------------
; Lcd Display interface Port:
; Lcd display has 32 segement maximum, and PA3075 series has 4 common port
; Names COM0, COM1, COM2, COM3.
; we can't write data to COM0 and COM3 directly, but we can write Data to
; COM1, COM2 respectively and then write and data to Port LoadCOM0 ($18),
; LoadCOM3 ($19). Hardware will pass the data from COM1, COM2 to COM0, COM3
; respectively
;
; P_10H_Lcd: (W) Segment 0.. 7 COM1 Data
; P_11H_Lcd: (W) Segment 8..15 COM1 Data
; P_12H_Lcd: (W) Segment 16..23 COM1 Data
; P_13H_Lcd: (W) Segment 24..31 COM1 Data
;
; P_14H_Lcd: (R/W) Segment 0.. 7 COM2 Data
; P_15H_Lcd: (R/W) Segment 8..15 COM2 Data
; P_16H_Lcd: (R/W) Segment 16..23 COM2 Data
; P_17H_Lcd: (R/W) Segment 24..31 COM2 Data
;
; LoadCOM0: (W) Load COM0 Data from COM1 data port
; LoadCOM3: (W) Load COM3 Data from COM2 data port
;-------------------------------------------------------------------------------
P_10H_Lcd10: EQU $10
P_11H_Lcd11: EQU $11
P_12H_Lcd12: EQU $12
P_13H_Lcd13: EQU $13
P_14H_Lcd20: EQU $14
P_15H_Lcd21: EQU $15
P_16H_Lcd22: EQU $16
P_17H_Lcd23: EQU $17
P_18H_LoadCOM0: EQU $18
P_19H_LoadCOM3: EQU $19
;-------------------------------------------------------------------------------
P_14H_TMR_CTR1: EQU $14
Timer1Clock_4: EQU %00010000 ;defined for Timer1H
P_1CH_TMR_CTR2: EQU $1c
P_1AH_LoadTimer0: EQU $1a
P_1EH_DAC: EQU $1EH
ToneMode: EQU %10000000 ;defined for Timer1H
;-------------------------------------------------------------------------------
P_1FH_LCD_Ctrl: EQU $1f
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -