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

📄 csd2x_1table.asm

📁 带触摸按键的高端电磁炉设计 该方案采用CYPRESS的新器件CY8C22545,是一款专门针对中高端的家电触摸产品设计。除了集成触摸按键功能外
💻 ASM
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: CSD2X_1TABLE.asm
;;   Version: @Version, Updated on @Data at @Time
;;  Generated by PSoC Designer ???
;;
;;  DESCRIPTION: CSD2X User Module Sensor Table
;;
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress Semiconductor 2008. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

include "m8c.inc"
include "memory.inc"
include "CSD2X_1.inc"

;-----------------------------------------------
;  Global Labels
;-----------------------------------------------

; Exported table
export  CSD2X_1_Sensor_Table_Left
export _CSD2X_1_Sensor_Table_Left
export  CSD2X_1_Sensor_Table_Right
export _CSD2X_1_Sensor_Table_Right
export  CSD2X_1_Order_Table_Left
export _CSD2X_1_Order_Table_Left
export  CSD2X_1_Order_Table_Right
export _CSD2X_1_Order_Table_Right
export  CSD2X_1_Group_Table
export _CSD2X_1_Group_Table
export  CSD2X_1_Diplex_Table
export _CSD2X_1_Diplex_Table
export CSD2X_1_FingerThreshold_Table
export _CSD2X_1_FingerThreshold_Table
export  CSD2X_1_Resolution_Table_Left
export _CSD2X_1_Resolution_Table_Left
export  CSD2X_1_Resolution_Table_Right
export _CSD2X_1_Resolution_Table_Right
export CSD2X_1_ScanSpeed_Table_Left
export _CSD2X_1_ScanSpeed_Table_Left
export CSD2X_1_ScanSpeed_Table_Right
export _CSD2X_1_ScanSpeed_Table_Right
export  CSD2X_1_RefValue_Table_Left
export _CSD2X_1_RefValue_Table_Left
export  CSD2X_1_RefValue_Table_Right
export _CSD2X_1_RefValue_Table_Right
export  CSD2X_1_DACL_Table
export _CSD2X_1_DACL_Table
export  CSD2X_1_DACR_Table
export _CSD2X_1_DACR_Table

AREA UserModules (ROM, REL, CON)

.LITERAL
;---------------------------------
; Tables below generated by Wizard
;---------------------------------
;
; The Sensor Table consists of two bytes for each sensor.  The first byte is the
; port number and the second is the bit mask for the bit not to be confused with
; the bit number.  For example an entry for port 2 bit 3 (P2[3])  would be
; "dw 0x0208".  This table consist of 0xc sensors.
 CSD2X_1_Sensor_Table_Left:
_CSD2X_1_Sensor_Table_Left:
	dw	0x0308
	dw	0x0320
	dw	0x0380
	dw	0x0402
	dw	0x0408
	dw	0x0420


 CSD2X_1_Sensor_Table_Right:
_CSD2X_1_Sensor_Table_Right:
	dw	0x0304
	dw	0x0310
	dw	0x0340
	dw	0x0401
	dw	0x0404
	dw	0x0410


;-----------------------------------------------------------------------------
; The Order Table consists of one byte for each sensor.  This byte is the
; left sensor order in result array without chanel dependence
;-----------------------------------------------------------------------------
 CSD2X_1_Order_Table_Left:
_CSD2X_1_Order_Table_Left:
DB 0x00,0x02,0x04,0x06,0x08,0x0A

CSD2X_1_Order_Table_Right:
_CSD2X_1_Order_Table_Right:
DB 0x01,0x03,0x05,0x07,0x09,0x0B

;-----------------------------------------------------------------------------
; The Group Table defines each of the groups of button sensors or sliders.
; There is one entry for each slider plus one for the free button sensors.
; The first entry is always the free sensors.  Each entry is four bytes.
;
; The first byte is the index in the Sensor Table where the group starts.
;
; The second byte is how many sensors are in that group.  For example, in a
; system where there are 6 free sensors and two sliders, the first with 8
; sensors and the second with 4, the table would look like the following.
;  db 0, 8
;  db 8, 8
;  db 16, 4
;
; The third byte signifies whether the slider is diplexed or not (4 is
; diplexed, 0 is not diplexed).
;
; The fourth, fifth, and sixth bytes are the fixed point multiplier that the
; slider's calculated centroid will be multiplied by to achieve the resolution
; desired in the CSDADC wizard.  The multiplier is three bytes containing the
; following bit definitions:
;  MSB:
;    bit 7   bit 6   bit 5   bit 4   bit 3   bit 2   bit 1   bit 0
;     x2^15	  x2^14   x2^13   x2^12   x2^11   x2^10   x2^9    x2^8
;  ISB:
;    bit 7   bit 6   bit 5   bit 4   bit 3   bit 2   bit 1   bit 0
;     x128	  x64     x32     x16     x8      x4      x2      x1
;  LSB:
;    bit 7   bit 6   bit 5   bit 4   bit 3   bit 2   bit 1   bit 0
;     x1/2	  x1/4    x1/8    x1/16   x1/32   x1/64   x1/128  x1/256
;
; The formula for the resolution is:
;    Resolution = (SensorsInSlider - 1) * Multiplier
;
; For example, if you had a 10 sensor slider and you wanted a resolution of
; 100, the multiplier would need to be 11.109375 to get the closest
; approximation (using 256ths).  Therefore the fixed point value would be:
;    MSB 00h
;    ISB 0bh
;    LSB 1ch
; as 8+2+1+1/16+1/32+1/64).  The GUI automatically calculates these values
; based on the resolution needed.
;
; There are 0x0 groups counting the free sensors.
;-----------------------------------------------------------------------------
 CSD2X_1_Group_Table:
_CSD2X_1_Group_Table:
; Group Table:
;    Origin    Count    Diplex?    DivBtwSw(wholeMSB, wholeLSB, fractByte)
 db   0x0,      0x0C,	 0x00,	 0x00,	 0x00,	 0x00 ; Buttons


;-----------------------------------------------------------------------------
; Diplex table scan order data is produced for a group when it is a slider and
; is also diplexed.  Otherwise a label is created but no data is placed.  The
; data represents the physical representation of the sensors in their location
; on the PCB.  A label containing the pointer to the corresponding table is
; also produced for referencing in the high-level centroid calculation
; function.
;-----------------------------------------------------------------------------

 CSD2X_1_Diplex_Table:
_CSD2X_1_Diplex_Table:
	db >DiplexTable_0, <DiplexTable_0

DiplexTable_0:
; This group is not a diplexed slider


;-----------------------------------------------------------------------------
; The FingerThreshold Table consists of one byte for each sensor.  This byte is the
; Finger Threshold value for High Level API
;-----------------------------------------------------------------------------

 CSD2X_1_FingerThreshold_Table:
_CSD2X_1_FingerThreshold_Table:
DB 0xC8,0xC8,0xC8,0xC8,0xC8,0xC8,0xC8,0xC8,0xC8,0xC8,0xC8,0xC8

;-----------------------------------------------------------------------------
; The Resolution Table consists of one byte for each sensor.  This byte is the
; current resolution value that is used for sensor scanning.
;
; 0x01 - 9 bit
; 0x03 - 10 bit
; 0x07 - 11 bit
; 0x0F - 12 bit
; 0x1F - 13 bit
; 0x3F - 14 bit
; 0x7F - 15 bit
; 0xFF - 16 bit
;
;-----------------------------------------------------------------------------

 CSD2X_1_Resolution_Table_Left:
_CSD2X_1_Resolution_Table_Left:
DB 0x07,0x07,0x07,0x07,0x07,0x07

 CSD2X_1_Resolution_Table_Right:
_CSD2X_1_Resolution_Table_Right:
DB 0x07,0x07,0x07,0x07,0x07,0x07

;-----------------------------------------------------------------------------
; The Scan SpeedTable consists of one byte for each sensor.  This byte is the
; scanning speed setting for sensors.
;
; 0 - Ultrafast
; 1 - Fast
; 2 - Normal
; 3 - Ultrafast
;
;-----------------------------------------------------------------------------

 CSD2X_1_ScanSpeed_Table_Left:
_CSD2X_1_ScanSpeed_Table_Left:
DB 0x00,0x00,0x00,0x00,0x00,0x00

CSD2X_1_ScanSpeed_Table_Right:
_CSD2X_1_ScanSpeed_Table_Right:
DB 0x00,0x00,0x00,0x00,0x00,0x00

;-----------------------------------------------------------------------------
; The Reference Value Table consists of one byte for each sensor.  This byte is the
; reference value from 0...7 that sets before sensor scanning.
;
; 0 - Ultrafast
; 1 - Fast
; 2 - Normal
; 3 - Ultrafast
;
;-----------------------------------------------------------------------------

 CSD2X_1_RefValue_Table_Left:
_CSD2X_1_RefValue_Table_Left:
DB 0x01,0x01,0x01,0x01,0x01,0x01

CSD2X_1_RefValue_Table_Right:
_CSD2X_1_RefValue_Table_Right:
DB 0x01,0x01,0x01,0x01,0x01,0x01

;-----------------------------------------------------------------------------
; The Left DAC Table consists of one byte for each sensor.  This byte is the
; left DAC value in range 0...FF for each sensor. Left DAC is as level shift Resistor in 1X configuration
; and is blade resistor for Left chanel in 2X configuration. Not applicable in Rb configuration
;-----------------------------------------------------------------------------
 CSD2X_1_DACL_Table:
_CSD2X_1_DACL_Table:
DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF

;-----------------------------------------------------------------------------
; The Right DAC Table consists of one byte for each sensor.  This byte is the
; Right DAC value in range  0...FF for each sensor. Right DAC is as Blade resistor resistor in both configurations.
; Not applicable in Rb configuration
;-----------------------------------------------------------------------------
 CSD2X_1_DACR_Table:
_CSD2X_1_DACR_Table:
DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF

.ENDLITERAL

⌨️ 快捷键说明

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