📄 a1600.lst
字号:
////.DW _RES_A52_ENC_SA;
////.DW _RES_A53_ENC_SA;
////.DW _RES_A54_ENC_SA;
////.DW _RES_A55_ENC_SA;
////.DW _RES_A56_ENC_SA;
////.DW _RES_A57_ENC_SA;
////.DW _RES_A58_ENC_SA;
.include spt6608.inc
< //============================================================================*/
< // Register address definitions */
< //============================================================================*/
< //-------------------------------------*/
< // Port A, B, C, D, E, F */
< //-------------------------------------*/
< .const P_IOA_Data =0x7000; //R/W, portA data
< // IOA0~IOA7 can be set as input or output pin by pin.
< // Input mode - IOA0~IOA7 provide pull-high resistosrs
< // IOA6 & IOA7 provide pull-low resistors
< // Output mode - CMOS output
< // Wake-up - IOA0~IOA7 all provide wake-up function
<
< .const P_IOA_Buf =0x7001; //R, port A output latch
< .const P_IOA_Dir =0x7002; //R/W, portA direction, 0/1 = I/O
< .const P_IOA_PullR =0x7003; //R/W, portA pull-highs & pull-lows
< // b15~b8 = 1 to enable pull-high of IOA7~IOA0
< // b7~b6 = 1 to enable pull-low of IOA7~IOA6
< .const P_IOA_Latch =0x7004; //R, latch IO for wakeup
<
< //---------------------------------
< .const P_IOB_Data =0x7005; //R/W, portB data
< // IOB0~IOB7 can be set as input or output pin by pin.
< // Input mode - CMOS input (without pulled reisitors)
< // Output mode - IOB0~IOB5 are CMOS outputs
< // IOB6 & IOB7 are NMOS open-drain
< // Wake-up - no wake-up function
<
<
< .const P_IOB_Buf =0x7006; //R, portB output latch
< .const P_IOB_Dir =0x7007; //R/W, portB direction, 0/1 = I/O
<
< //---------------------------------
< .const P_IOC_Data =0x7008; //R/W, portC data
< // IOC0~IOC7 can be set as input or output pin by pin.
< // Input mode - CMOS input (without pulled reisitors)
< // Output mode - IOC0~IOC4 are CMOS outputs
< // IOC5 & IOC7 are NMOS open-drain
< // Wake-up - IOC0 & IOC1 provide wake-up function
< .const P_IOC_Buf =0x7009; //R, portC output latch
< .const P_IOC_Dir =0x700A; //R/W, portC direction
<
< //---------------------------------
< .const P_IOD_Data =0x700B; //R/W, portD data
< // IOD0~7 can be set as input or output pin by pin.
< // Input mode - CMOS input (without pulled reisitors)
< // Output mode - IOD0~IOD7 are CMOS outputs
< // Wake-up - no wake-up function
<
< .const P_IOD_Buf =0x700C; //R, portD output latch
< .const P_IOD_Dir =0x700D; //R/W, portD direction, 0/1 = I/O
<
<
< //---------------------------------
< .const P_IOE_Data =0x7050; //R/W, portA data
< // IOE0~IOE7 can be set as input or output pin by pin.
< // Input mode - IOE0~IOE7 provide pull-high resistosrs
< // IOE6 & IOE7 provide pull-low resistors
< // Output mode - CMOS output
< // Wake-up - IOE0~IOE7 all provide wake-up function
<
< .const P_IOE_Buf =0x7051; //R, port E output latch
< .const P_IOE_Dir =0x7052; //R/W, portE direction, 0/1 = I/O
< .const P_IOE_PullR =0x7053; //R/W, portE pull-highs & pull-lows
< // b15~b8 = 1 to enable pull-high of IOE7~IOE0
< // b7~b6 = 1 to enable pull-low of IOE7~IOE6
< .const P_IOE_Latch =0x7054; //R, latch IO for wakeup
< //---------------------------------
<
< .const P_IOCD_Ctrl =0x700E;
< // b0,b1, 00 - C0 provide interrupt/wake-up at falling edge
< // 01 - C0 provide interrupt/wake-up at rising edge
< // 1x - C0 provide interrupt/wake-up at both edges
< // b3~b2, 00 - C1 provide interrupt/wake-up at falling edge
< // 01 - C1 provide interrupt/wake-up at rising edge
< // 1x - C1 provide interrupt/wake-up at both edgex
< // b4, 0 - tone output (IOD1) comes from timer A overflow
< // 1 - tone output (IOD1) comes from timer B overflow
< // b5, 0 - IOD1 is normal I/O
< // 1 - IOD1 is tone-output
<
<
<
< //-------------------------------*/
< // Interrupt & Wake-Up */
< //-------------------------------*/
< .const P_Int =0x7010; // write 0/1 - disable/enable interrupt
< // read 0/1 - interrupt is disabled/enabled
< .const P_IntClr =0x7011; // write 1 - clear happened interrupt flag
< // read 1 - interrupt is happened
< .const P_WakeUp =0x7012; // write 0/1 - disable/enable wake-up
< // read 0/1 - wake-up is disabled/enabled
< .const P_WakeUpClr =0x7013; // write 1 - clear happened wake-up flag
< // read 1 - wake-up is happened
<
<
< .const B_Irq0 =0x0001; // vector = FFF8
< .const B_RiInt =0x0001;
<
< .const B_Irq1 =0x0002; // vector = FFF9
< .const B_IoaInt =0x0002;
<
< .const B_Irq2 =0x0004; // vector = FFFA
< .const B_TmrAInt =0x0004;
< .const B_Irq3 =0x0008; // vector = FFFB
< .const B_TmrBInt =0x0008;
< .const B_Irq4 =0x0010; // vector = FFFC
< .const B_T32KHzInt =0x0010;
< .const B_8KHzInt =0x0010;
< .const B_Irq5 =0x0020; // vector = FFFD
< .const B_T2KHzInt =0x0020;
< .const B_1KHzInt =0x0020;
< .const B_512HzInt =0x0020;
< .const B_Irq6 =0x0040; // vector = FFFE
< .const B_T128HzInt =0x0040;
< .const B_T8HzInt =0x0080; // vector = FFFF
< .const B_2HzInt =0x0080;
< .const B_Ioc0Int =0x0100; // vector = FFF6
< .const B_Ioc1Int =0x0200; // vector = FFF8
< .const B_LineInt =0x0400; // vector = FFF8
< .const B_URATInt =0x0800; // vector = FFF6
< .const B_IrDAInt =0x0800; // vector = FFF6
< //-------------------------------*/
< .const P_IoaWakeUp =0x7014; // R/W, b7~b0=1 to enable IOA7~0 wake-up
< .const P_IoeWakeUp =0x7055; // R/W, b7~b0=1 to enable IOE7~0 wake-up
<
< //-------------------------------*/
< // System Clock */
< //-------------------------------*/
< .const P_SystemClock =0x7015;
< // b2~b0: CPU Operating Clock Select
< // 000 - Fosc
< // 001 - Fosc/2
< // 010 - Fosc/4
< // 011 - Fosc/8 (default)
< // 100 - Fosc/8
< // 101 - Fosc/8
< // 110 - Fosc/8
< // 111 - Stop/Sleep
< // b7: 0 - Fosc= Low-Speed Mode
< // 1 - Fosc= High-Speed Mode
< .const B_FoscDivBy1 =0x0000;
< .const B_FoscDivBy2 =0x0001;
< .const B_FoscDivBy4 =0x0002;
< .const B_FoscDivBy8 =0x0003;
< .const B_Sleep =0x0007;
< .const B_NormalCpuClock =B_FoscDivBy4;
< .const B_10M =0x0080;
<
< .const P_Watchdog_Clr =0x7016; // period = 2sec
< // write 16-bit (0x55AA) value to reset watch dog
<
< //-------------------------------*/
< // Time Base */
< //-------------------------------*/
< .const P_TimeBaseSet =0x7018;
< // b15: enable 32768
< // b14: weak/strong mode
< // b7~b6: T32KHzS
< // 00 - 4KHz
< // 01 - 8KHz
< // 10 - 16KHz
< // 11 - 32KHz
< // b5~b4: T2KHz
< // 00 - 256Hz
< // 01 - 512Hz
< // 10 - 1KHz
< // 11 - 2KHz
< // b3~b2: T128HzS
< // 00 - 16Hz
< // 01 - 32Hz
< // 10 - 64Hz
< // 11 - 128Hz
< // b1~b0: T8HzS
< // 00 - 1Hz
< // 01 - 2Hz
< // 10 - 4Hz
< // 11 - 8Hz
< // Time Base, generated by 32768Hz, is a combination of frequency selection
< // for timers and interrupt.
<
< .const B_Enable32768 =0x8000;
< .const B_Strong32768 =0x4000; // After powering on, set 32768 at strong mode
< .const B_1Hz =0x0000;
< .const B_2Hz =0x0001;
< .const B_4Hz =0x0002;
< .const B_8Hz =0x0003;
< .const B_16Hz =0x0000;
< .const B_32Hz =0x0004;
< .const B_64Hz =0x0008;
< .const B_128Hz =0x000C;
< .const B_256Hz =0x0000;
< .const B_512Hz =0x0010;
< .const B_1KHz =0x0020;
< .const B_2KHz =0x0030;
< .const B_4KHz =0x0000;
< .const B_8KHz =0x0040;
< .const B_16KHz =0x0080;
< .const B_32KHz =0x00C0;
<
< //-------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -