⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spt6604a.inc

📁 使用GPTC6604做的一个录放音DEMO
💻 INC
字号:
//----------------------------------------------------------------------------
//Register address definitions
//----------------------------------------------------------------------------

//----------------------------------------------------------------------------
//Port A, B, C, D
//----------------------------------------------------------------------------
.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(5bit)
        // IOC0,IOC1,IOC4,IOC5,IOC7 can be set as input or output pin by pin.
        // Input mode  - CMOS input (without pulled reisitors)
        // Output mode - IOC0,IOC1,IOC4 are CMOS outputs
        //               IOC5,IOC7 are NMOS open-drain
        // Wake-up     - IOC0 & IOC1 provide wake-up function
.CONST	P_IOC_Buf		= 0x7009
.const  P_IOC_Dir       = 0x700A        //R/W, portC direction
//----------------------------------------------------------------------------
.const  P_IOD_Data      = 0x700B        //R/W, portD data(1bit)
        // IOD1 can be set as input or output pin by pin.
        // Input mode  - IOD1 are CMOS input (without pulled reisitors)
        // Output mode - IOD1 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_IOCD_Ctrl     = 0x700E
//   XXXX XXXX 7 6 5 4 3 2 1 0
//                 | | | | | |
//                 | | | | +-+---C0EG 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 edges
//                 | | +-+-------C1EG 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
//                 | +-----------TMSEL 0 - tone output (IOD1) comes from timer A overflow
//                 |         

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -