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

📄 csd2x_1int.asm

📁 带触摸按键的高端电磁炉设计 该方案采用CYPRESS的新器件CY8C22545,是一款专门针对中高端的家电触摸产品设计。除了集成触摸按键功能外
💻 ASM
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: CSD2X_1INT.asm
;;  Version: 1.0, Updated on 2008/12/13 at 11:0:40
;;  Generated by PSoC Designer ???
;;
;;  DESCRIPTION: CSD2X User Module ISR implementation file for the
;;               22x45 PSoC family of devices.
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress Semiconductor 2008. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

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

;-----------------------------------------------
;  Global Symbols
;-----------------------------------------------

export _CSD2X_1_L_ISR
export _CSD2X_1_R_ISR


AREA InterruptRAM (RAM,REL,CON)

;@PSoC_UserCode_INIT@ (Do not change this line.)
;---------------------------------------------------
; Insert your custom declarations below this banner
;---------------------------------------------------

;------------------------
; Includes
;------------------------


;------------------------
;  Constant Definitions
;------------------------


;------------------------
; Variable Allocation
;------------------------


;---------------------------------------------------
; Insert your custom declarations above this banner
;---------------------------------------------------
;@PSoC_UserCode_END@ (Do not change this line.)

LSB:  equ  1
MSB:  equ  0

AREA UserModules (ROM, REL)

;-----------------------------------------------------------------------------
;  FUNCTION NAME: _CSD2X_1_L_ISR
;
;  DESCRIPTION: Interrupt Service Routine from the 16 bit interval counter in the CSD.  If the interrupt
;  is enabled and the interval counter reaches terminal count
;  the code execution will vector to this ISR
;
;-----------------------------------------------------------------------------
;
_CSD2X_1_L_ISR:
   push A
   push X

   RAM_CHANGE_PAGE_MODE FLAG_PGMODE_10b
   REG_PRESERVE IDX_PP
   RAM_SETPAGE_IDX >CSD2X_1_waSnsResult

   mov A, [CSD2X_1_bSensorNumLeft]                ; Get sensor index
   index CSD2X_1_Order_Table_Left
   asl A       
   mov X,A
   
   ; Store the data
   mov A, reg[CSD0_CNT_L]
   mov [X+CSD2X_1_waSnsResult+LSB], A             ; Read data LSB
   mov A, reg[CSD0_CNT_H]
   mov [X+CSD2X_1_waSnsResult+MSB], A             ; Read data MSB
   RAM_CHANGE_PAGE_MODE FLAG_PGMODE_00b
   
   or reg[CSD0_CR0],08h                           ; Reset Counter
 
   and  [CSD2X_1_bfStatus_Left], ~CSD2X_1_SCAN_ACTIVE   ; Clear scan active flag
   	  
   ;@PSoC_UserCode_R_ISR@ (Do not change this line.)
   ;---------------------------------------------------
   ; Insert your custom code below this banner
   ;---------------------------------------------------
   ;   NOTE: interrupt service routines must preserve
   ;   the values of the A and X CPU registers.

   ;---------------------------------------------------
   ; Insert your custom code above this banner
   ;---------------------------------------------------
   ;@PSoC_UserCode_END@ (Do not change this line.)

   
   REG_RESTORE IDX_PP

   pop    X
   pop    A

   reti
   
;-----------------------------------------------------------------------------
;  FUNCTION NAME: _CSD2X_1_R_ISR
;
;  DESCRIPTION: Interrupt Service Routine from the 16 bit interval counter in the CSD.  If the interrupt
;  is enabled and the interval counter reaches terminal count
;  the code execution will vector to this ISR
;
;-----------------------------------------------------------------------------
;
_CSD2X_1_R_ISR:

   push A
   push X

   RAM_CHANGE_PAGE_MODE FLAG_PGMODE_10b
   REG_PRESERVE IDX_PP
   RAM_SETPAGE_IDX >CSD2X_1_waSnsResult

   mov A, [CSD2X_1_bSensorNumRight]               ; Get sensor index
   index CSD2X_1_Order_Table_Right
   asl A       
   mov X,A
   
   ; Store the data
   mov A, reg[CSD1_CNT_L]
   mov [X+CSD2X_1_waSnsResult+LSB], A             ; Read data LSB
   mov A, reg[CSD1_CNT_H]
   mov [X+CSD2X_1_waSnsResult+MSB], A             ; Read data MSB
   RAM_CHANGE_PAGE_MODE FLAG_PGMODE_00b
   
   or reg[CSD1_CR0],08h                           ; Reset Counter
 
   and  [CSD2X_1_bfStatus_Right], ~CSD2X_1_SCAN_ACTIVE   ; Clear scan active flag
   	  
   ;@PSoC_UserCode_L_ISR@ (Do not change this line.)
   ;---------------------------------------------------
   ; Insert your custom code below this banner
   ;---------------------------------------------------
   ;   NOTE: interrupt service routines must preserve
   ;   the values of the A and X CPU registers.

   ;---------------------------------------------------
   ; Insert your custom code above this banner
   ;---------------------------------------------------
   ;@PSoC_UserCode_END@ (Do not change this line.)

  
   REG_RESTORE IDX_PP

   pop    X
   pop    A


   reti

; end of file CSD2XINT.asm

⌨️ 快捷键说明

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