📄 csa_1int.asm
字号:
;;*****************************************************************************
;;*****************************************************************************
;; FILENAME: CSA_1INT.asm
;; @Versions@
;; Generated by PSoC Designer ver 4.3 b1884 : 23 June, 2006
;;
;; DESCRIPTION: CSA_1 User Module ISR implementation file for the
;; 20x34 PSoC family of devices.
;;-----------------------------------------------------------------------------
;; Copyright (c) Cypress Semiconductor 2000-2006. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************
include "m8c.inc"
include "memory.inc"
include "CSA_1.inc"
MSB: equ 0
LSB: equ 1
;-----------------------------------------------
; Global Symbols
;-----------------------------------------------
export _CSA_1_ISR
;-----------------------------------------------------------------------------
; FUNCTION NAME: CSA_1_ISR
;
; DESCRIPTION:
; Interrupt Service Routine for the 16 bit counter in the CSA. If the interrupt
; is enabled and the comparator trips or the counter reaches terminal count
; the code execution will vector to this ISR.
;
_CSA_1_ISR:
push A
push X
RAM_CHANGE_PAGE_MODE FLAG_PGMODE_10b
REG_PRESERVE IDX_PP
RAM_SETPAGE_IDX >CSA_1_waSnsResult
mov A, [CSA_1_bSensorNum] ; Get sensor index
asl A
mov X,A
; Store the data
mov A, reg[CS_CNTL]
mov [X+CSA_1_waSnsResult+LSB], A
mov A, reg[CS_CNTH]
mov [X+CSA_1_waSnsResult+MSB], A
RAM_CHANGE_PAGE_MODE FLAG_PGMODE_00b
and [CSA_1_bfStatus], ~CSA_1_SCAN_ACTIVE ; Clear scan active flag
.END_SCAN_ISR:
;@PSoC_UserCode_BODY_TERMINAL@ (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 CSA_1INT.asm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -