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

📄 csdtable.lis

📁  PSoC(可编程片上系统)是Cypress半导体公司生产的包含有8位微处理器核和数字与模拟混合的信号阵列芯片
💻 LIS
📖 第 1 页 / 共 4 页
字号:
 0001           CSD_FEEDBACK_P3_1:                     equ 1
 0002           CSD_FEEDBACK_P1_5:                     equ 2
 0000           
 0001           CSD_CAPACITOR_PIN:                     equ 1
 0001           CSD_CAPACITOR_P0_1:                    equ 1
 0002           CSD_CAPACITOR_P0_3:                    equ 2
 0000           
 0000           CSD_AUTORESET:                         equ 0
 0000           
 0000           ;--------------------------------------------------
 0000           ; Constants for Scan Speed values
 0000           ;--------------------------------------------------
 0000           CSD_ULTRA_FAST_SPEED:                  equ 0x00
 0001           CSD_FAST_SPEED:                        equ 0x01
 0002           CSD_NORMAL_SPEED:                      equ 0x02
 0003           CSD_SLOW_SPEED:                        equ 0x03
 0000           
 0000           ;--------------------------------------------------
 0000           ; Constants for Resolution values
 0000           ;--------------------------------------------------
 0009           CSD_MIN_RESOLUTION:                    equ 9
 0010           CSD_MAX_RESOLUTION:                    equ 16
 0000           
 0000           ;--------------------------------------------------
 0000           ; Constants for CSD API's
 0000           ;--------------------------------------------------
 0000           
 0000           CSD_ButtonCount:                       equ 0h
 0001           CSD_SliderCount:                       equ 1h
 0007           CSD_TotalSensorCount:                  equ 7h
 0000           
 0000           CSD_BUTTONS_EXIST:                     equ 0h
 0001           CSD_SLIDERS_EXIST:                     equ 1h
 0000           
 000A           CSD_HYSTERESIS:                                  equ ah
 0003           CSD_Debounce:                                    equ 3h
 0032           CSD_LowBaselineReset:                            equ 32h
 0000           
 0064           CSD_FINGER_THRESHOLD:                            equ 64h
 0028           CSD_NOISE_THRESHOLD:                             equ 28h
 0014           CSD_NEGATIVE_NOISE_THRESHOLD:                    equ 14h
 00C8           CSD_BASELINE_UPDATE_THRESHOLD:                   equ c8h
 0000           
 0000           ;--------------------------------------------------
 0000           ; Registers Address Constants for CSD
 0000           ;--------------------------------------------------
 0000           
 0020           CSD_CNT_FUNC_REG:                      equ 20h              ; CNT Function Reg
 0021           CSD_CNT_IN_REG:                        equ 21h              ; CNT Input Reg
 0022           CSD_CNT_OUT_REG:                       equ 22h              ; CNT Output Reg
 0020           CSD_CNT_COUNTER_REG:                   equ 20h              ; CNT Counter Reg
 0021           CSD_CNT_PERIOD_REG:                    equ 21h              ; CNT Period Reg
 0022           CSD_CNT_COMPARE_REG:                   equ 22h              ; CNT Compare Reg
 0023           CSD_CNT_CONTROL_REG:                   equ 23h              ; CNT Control Reg
 0000           
 0024           CSD_PRS_FUNC_LSB_REG:                  equ 24h              ; PRS LSB Function Reg
 0025           CSD_PRS_IN_LSB_REG:                    equ 25h              ; PRS LSB Input Reg
 0026           CSD_PRS_OUT_LSB_REG:                   equ 26h              ; PRS LSB Output Reg
 0027           CSD_PRS_CONTROL_LSB_REG:               equ 27h              ; PRS LSB Control Reg
 0024           CSD_PRS_SHIFT_LSB_REG:                 equ 24h              ; PRS LSB Shift Reg
 0025           CSD_PRS_POLY_LSB_REG:                  equ 25h              ; PRS LSB Polynomial Reg
 0026           CSD_PRS_SEED_LSB_REG:                  equ 26h              ; PRS LSB Seed Reg
 0000           
 0028           CSD_PRS_FUNC_MSB_REG:                  equ 28h              ; PRS MSB Function Reg
 0029           CSD_PRS_IN_MSB_REG:                    equ 29h              ; PRS MSB Input Reg
 002A           CSD_PRS_OUT_MSB_REG:                   equ 2ah              ; PRS MSB Output Reg
 002B           CSD_PRS_CONTROL_MSB_REG:               equ 2bh              ; PRS MSB Control Reg
 0028           CSD_PRS_SHIFT_MSB_REG:                 equ 28h              ; PRS MSB Shift Reg
 0029           CSD_PRS_POLY_MSB_REG:                  equ 29h              ; PRS MSB Polynimial Reg
 002A           CSD_PRS_SEED_MSB_REG:                  equ 2ah              ; PRS MSB Seed Reg
 0000           
 0076           CSD_ACE_CONTROL1_REG:                  equ 76h              ; CMP Control Reg
 0077           CSD_ACE_CONTROL2_REG:                  equ 77h              ; CMP Control Reg
 0000           
 0084           CSD_ASE_CONTROL_REG:                   equ 84h              ; CMP_REF Conrol Reg
 00E6           CSD_ADC_TRIM_REG:                      equ e6h              ; ADC Trim Register
 0069           CSD_ADC_CONTROL_REG:                   equ 69h              ; ADC Control Reg
 0000           
 0000           
 0000           DR_OFFSET:                             equ 00h
 0000           DM0_OFFSET:                            equ 00h              ; Bank 1
 0001           DM1_OFFSET:                            equ 01h              ; Bank 1
 0003           DM2_OFFSET:                            equ 03h              ; Bank 0
 00D8           MUX_OFFSET:                            equ MUX_CR0          ; Bank 1
 0000           
 0000           ;--------------------------------------------------
 0000           ; CSD Macro 'Functions'
 0000           ;--------------------------------------------------
 0000           
 0000           macro CSD_Counter_Start_M
 0000              or    reg[CSD_CNT_CONTROL_REG],  CSD_CNT_CONTROL_REG_START_BIT
 0000           macro CSD_Counter_Stop_M
 0000              and   reg[CSD_CNT_CONTROL_REG], ~CSD_CNT_CONTROL_REG_START_BIT
 0000           macro CSD_Counter_EnableInt_M
 0000              M8C_EnableIntMask CSD_CNT_INT_REG, CSD_CNT_INT_MASK
 0000           macro CSD_Counter_DisableInt_M
 0000              M8C_DisableIntMask CSD_CNT_INT_REG, CSD_CNT_INT_MASK
 00E0           CSD_CMP_CMPIntReg:                     equ  0e0h
 0004           CSD_CMP_CMPIntMask:                    equ  04h
 0000           
 0000           CSD_CMP_OFF:                           equ  0
 0001           CSD_CMP_ON:                            equ  1
 0000           
 0000           ;--------------------------------------------------
 0000           ; Constants for CSD_Counter API's.
 0000           ;--------------------------------------------------
 0000           
 0001           CSD_CNT_CONTROL_REG_START_BIT:         equ 0x01             ; Control register start bit
 00E1           CSD_CNT_INT_REG:                       equ 0x0e1
 0001           CSD_CNT_INT_MASK:                      equ 0x01
 0000           
 0000           ;--------------------------------------------------
 0000           ; Constants for CSD_Counter user defined values
 0000           ;--------------------------------------------------
 0000           
 00FF           CSD_CNT_PERIOD:                        equ 0xff
 0000           CSD_CNT_COMPARE_VALUE:                 equ 0x00
 0000           
 0000           ; end of file CSD.inc
 0000           
 0000           ;-----------------------------------------------
 0000           ;  Global Labels
 0000           ;-----------------------------------------------
 0000           
 0000           ; Exported table
                export  CSD_Sensor_Table
                export _CSD_Sensor_Table
                export  CSD_Group_Table
                export _CSD_Group_Table
                export  CSD_Diplex_Table
                export _CSD_Diplex_Table
                
                AREA UserModules (ROM, REL, CON)
                
 0000           .LITERAL
 0000           ;---------------------------------
 0000           ; Tables below generated by Wizard
 0000           ;---------------------------------
 0000           ; The Sensor Table consists of two bytes for each sensor.  The first byte is the
 0000           ; port number and the second is the bit mask for the bit not to be confused with
 0000           ; the bit number.  For example an entry for port 2 bit 3 (P2[3])  would be
 0000           ; "dw 0x0208".  This table consist of 0x7 sensors.
 0000            CSD_Sensor_Table:
 0000           _CSD_Sensor_Table:
 0000 0202              dw      0x0202  // Port 2 Bit 1
 0002 0204              dw      0x0204  // Port 2 Bit 2
 0004 0208              dw      0x0208  // Port 2 Bit 3
 0006 0210              dw      0x0210  // Port 2 Bit 4
 0008 0220              dw      0x0220  // Port 2 Bit 5
 000A 0240              dw      0x0240  // Port 2 Bit 6
 000C 0280              dw      0x0280  // Port 2 Bit 7
 000E           
 000E           
 000E           ;-----------------------------------------------------------------------------
 000E           ; The Group Table defines each of the groups of button sensors or sliders.
 000E           ; There is one entry for each slider plus one for the free button sensors.
 000E           ; The first entry is always the free sensors.  Each entry is four bytes.
 000E           ;
 000E           ; The first byte is the index in the Sensor Table where the group starts.
 000E           ;
 000E           ; The second byte is how many sensors are in that group.  For example, in a
 000E           ; system where there are 6 free sensors and two sliders, the first with 8
 000E           ; sensors and the second with 4, the table would look like the following.
 000E           ;  db 0, 8
 000E           ;  db 8, 8
 000E           ;  db 16, 4
 000E           ;
 000E           ; The third byte signifies whether the slider is diplexed or not (4 is
 000E           ; diplexed, 0 is not diplexed).
 000E           ;
 000E           ; The fourth, fifth, and sixth bytes are the fixed point multiplier that the
 000E           ; slider's calculated centroid will be multiplied by to achieve the resolution
 000E           ; desired in the CSD wizard.  The multiplier is three bytes containing the
 000E           ; following bit definitions:
 000E           ;  MSB:
 000E           ;    bit 7   bit 6   bit 5   bit 4   bit 3   bit 2   bit 1   bit 0
 000E           ;     x2^15       x2^14   x2^13   x2^12   x2^11   x2^10   x2^9    x2^8
 000E           ;  ISB:
 000E           ;    bit 7   bit 6   bit 5   bit 4   bit 3   bit 2   bit 1   bit 0
 000E           ;     x128        x64     x32     x16     x8      x4      x2      x1
 000E           ;  LSB:
 000E           ;    bit 7   bit 6   bit 5   bit 4   bit 3   bit 2   bit 1   bit 0
 000E           ;     x1/2        x1/4    x1/8    x1/16   x1/32   x1/64   x1/128  x1/256
 000E           ;
 000E           ; The formula for the resolution is:
 000E           ;    Resolution = (SensorsInSlider - 1) * Multiplier
 000E           ;
 000E           ; For example, if you had a 10 sensor slider and you wanted a resolution of
 000E           ; 100, the multiplier would need to be 11.109375 to get the closest
 000E           ; approximation (using 256ths).  Therefore the fixed point value would be:
 000E           ;    MSB 00h
 000E           ;    ISB 0bh
 000E           ;    LSB 1ch
 000E           ; as 8+2+1+1/16+1/32+1/64).  The GUI automatically calculates these values
 000E           ; based on the resolution needed.
 000E           ;
 000E           ; There are 0x1 groups counting the free sensors.
 000E           ;-----------------------------------------------------------------------------
 000E            CSD_Group_Table:
 000E           _CSD_Group_Table:
 000E           ; Group Table:
 000E           ;	Origin	Count	Diplex?	DivBtwSw(wholeMSB, wholeLSB, fractByte)
 000E 000000000000 db   0x0,    0x0,    0x0,                            0x0,    0x0,    0x0 ; Buttons
 0014 000700001080 db   0x0,    0x7,    0x0,                            0x0,    0x10,   0x80 ; Slider 0
 001A           
 001A           ;-----------------------------------------------------------------------------
 001A           ; Diplex table scan order data is produced for a group when it is a slider and
 001A           ; is also diplexed.  Otherwise a label is created but no data is placed.  The
 001A           ; data represents the physical representation of the sensors in their location
 001A           ; on the PCB.  A label containing the pointer to the corresponding table is
 001A           ; also produced for referencing in the high-level centroid calculation
 001A           ; function.
 001A           ;-----------------------------------------------------------------------------
 001A           DiplexTable_0:
 001A           ;	This group is not a diplexed slider
 001A           DiplexTable_1:
 001A 0001020304050600030601040205      db      0,1,2,3,4,5,6,0,3,6,1,4,2,5     // 7 switch slider
 0028           
 0028            CSD_Diplex_Table:
 0028           _CSD_Diplex_Table:
 0028 1A1A              db >DiplexTable_0, <DiplexTable_0
 002A 1A1A              db >DiplexTable_0, <DiplexTable_0
 002C           .ENDLITERAL

⌨️ 快捷键说明

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