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

📄 diffamp2.asm

📁 Application Note Abstract The unique configuration of the PSoC&reg switched capacitor blocks allows
💻 ASM
字号:
;;********************************************************************
;;********************************************************************
;;  DiffAmp2.asm
;;
;;  Assembler source for Generic Switched Cap (SCBLOCK) User Module
;;
;;  REV B, 2002 Aug 22
;;
;;  Copyright: Cypress MicroSystems 2000-2002.  All Rights Reserved.
;;
;;*********************************************************************
;;*********************************************************************

export  DiffAmp2_Start
export _DiffAmp2_Start
export  DiffAmp2_SetPower
export _DiffAmp2_SetPower
export  DiffAmp2_Stop
export _DiffAmp2_Stop

;; -----------------------------------------------------------------
;;                         Register Definitions
;; -----------------------------------------------------------------
;; BIT FIELD            Mask 
;; -----------------    ----- 
;; CR0.FCap              80
;; CR0.ClockPhase        40
;; CR0.ASign             20
;; CR0.ACap              1F
;; 
;; CR1.AMux              C0   SCB
;; CR1.ACMux             C0   SCA
;; CR1.BCap              1F
;;
;; CR2.AnalogBus         80
;; CR2.CmpBus            40
;; CR2.AutoZero          20
;; CR2.CCap              1F
;;
;; CR3.RefSelect         C0
;; CR3.FSW1              20
;; CR3.FSW0              10
;; CR3.BSW               08   SCB
;; CR3.BMux              04   SCB
;; CR3.BMux              0C   SCA
;; CR3.Power             03
;;

include "DiffAmp2.inc"
include "m8c.inc"

;;-------------------------------------------------------------------
;;  Start:
;;  SetPower:
;;  Applies power setting to the module's analog PSoc block.
;;  INPUTS:  A contains the power setting 0-3
;;  OUTPUTS: None.  
;;------------------------------------------------------------------
 DiffAmp2_Start:
_DiffAmp2_Start:
 DiffAmp2_SetPower:
_DiffAmp2_SetPower:
   and  A,03h
   push X
   mov  X,SP

   push A
   mov  A,reg[DiffAmp2_cr3]
   and  A,~03h
   or   A,[X]
   mov  reg[DiffAmp2_cr3],A
   pop  A
   pop  X
   ret


;;------------------------------------------------------------------
;;  Stop:
;;  Removes power from the module's analog PSoc block.
;;
;;  INPUTS:  None.
;;  OUTPUTS: None.  
;;
;;------------------------------------------------------------------

 DiffAmp2_Stop:
_DiffAmp2_Stop:
   and  reg[DiffAmp2_cr3],~03h
   ret

DiffAmp2_API_End:   

⌨️ 快捷键说明

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