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

📄 csa_1table.asm

📁 电容感应程序
💻 ASM
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: CSA_1TABLE.asm
;;   @Versions@
;;  Generated by PSoC Designer ver 4.3  b1884 : 23 June, 2006
;;
;;  DESCRIPTION: CSA User Module Sensor Table
;;
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress Semiconductor 2000-2006. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

include "m8c.inc"
include "memory.inc"
include "CSA_1.inc"

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

; Exported table
export  CSA_1_Sensor_Table
export _CSA_1_Sensor_Table
export  CSA_1_Group_Table
export _CSA_1_Group_Table
export  CSA_1_Diplex_Table
export _CSA_1_Diplex_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 0xf sensors.
 CSA_1_Sensor_Table:
_CSA_1_Sensor_Table:
	dw	0x0104	// Port 1 Bit 2
	dw	0x0110	// Port 1 Bit 4
	dw	0x0140	// Port 1 Bit 6
	dw	0x0304	// Port 3 Bit 2
	dw	0x0308	// Port 3 Bit 3
	dw	0x0301	// Port 3 Bit 0
	dw	0x0108	// Port 1 Bit 3
	dw	0x0001	// Port 0 Bit 0
	dw	0x0002	// Port 0 Bit 1
	dw	0x0004	// Port 0 Bit 2
	dw	0x0280	// Port 2 Bit 7
	dw	0x0010	// Port 0 Bit 4
	dw	0x0020	// Port 0 Bit 5
	dw	0x0040	// Port 0 Bit 6
	dw	0x0080	// Port 0 Bit 7


;-----------------------------------------------------------------------------
; 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 (1 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 CSA 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 0x1 groups counting the free sensors.
;-----------------------------------------------------------------------------
 CSA_1_Group_Table:
_CSA_1_Group_Table:
; Group Table:
;    Origin    Count    Diplex?    DivBtwSw(wholeMSB, wholeLSB, fractByte)
 db   0x0,      0x7,	 0x00,	 0x00,	 0x00,	 0x00 ; Buttons
 db   0x7,	    0x8,	 0x4,	 0x0,	 0x8,	 0x77 ; Slider 1


;-----------------------------------------------------------------------------
; 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.
;-----------------------------------------------------------------------------
DiplexTable_0:
; This group is not a diplexed slider
DiplexTable_1:
	db	0,1,2,3,4,5,6,7,0,3,6,1,4,7,2,5	// 8 switch slider


 CSA_1_Diplex_Table:
_CSA_1_Diplex_Table:
	db >DiplexTable_0, <DiplexTable_0
	db >DiplexTable_1, <DiplexTable_1

.ENDLITERAL

⌨️ 快捷键说明

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