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

📄 clock_timer_good.lst

📁 cy8c24794单片机程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
(0007) ;;  DESCRIPTION: Timer16 Interrupt Service Routine
(0008) ;;-----------------------------------------------------------------------------
(0009) ;;  Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
(0010) ;;*****************************************************************************
(0011) ;;*****************************************************************************
(0012) 
(0013) include "m8c.inc"
(0014) include "memory.inc"
(0015) include "Timer16.inc"
(0016) 
(0017) 
(0018) ;-----------------------------------------------
(0019) ;  Global Symbols
(0020) ;-----------------------------------------------
(0021) export  _Timer16_ISR
(0022) 
(0023) 
(0024) AREA InterruptRAM (RAM,REL,CON)
(0025) 
(0026) ;@PSoC_UserCode_INIT@ (Do not change this line.)
(0027) ;---------------------------------------------------
(0028) ; Insert your custom declarations below this banner
(0029) ;---------------------------------------------------
(0030) 
(0031) ;------------------------
(0032) ; Includes
(0033) ;------------------------
(0034) 
(0035) 	
(0036) ;------------------------
(0037) ;  Constant Definitions
(0038) ;------------------------
(0039) 
(0040) 
(0041) ;------------------------
(0042) ; Variable Allocation
(0043) ;------------------------
(0044) 
(0045) 
(0046) ;---------------------------------------------------
(0047) ; Insert your custom declarations above this banner
(0048) ;---------------------------------------------------
(0049) ;@PSoC_UserCode_END@ (Do not change this line.)
(0050) 
(0051) 
(0052) AREA UserModules (ROM, REL)
(0053) 
(0054) ;-----------------------------------------------------------------------------
(0055) ;  FUNCTION NAME: _Timer16_ISR
(0056) ;
(0057) ;  DESCRIPTION: Unless modified, this implements only a null handler stub.
(0058) ;
(0059) ;-----------------------------------------------------------------------------
(0060) ;
(0061) 
(0062) _Timer16_ISR:
(0063) 
(0064)    ;@PSoC_UserCode_BODY@ (Do not change this line.)
(0065)    ;---------------------------------------------------
(0066)    ; Insert your custom code below this banner
(0067)    ;---------------------------------------------------
(0068)    ;   NOTE: interrupt service routines must preserve
(0069)    ;   the values of the A and X CPU registers.
(0070) 
(0071)    ;---------------------------------------------------
(0072)    ; Insert your custom code above this banner
(0073)    ;---------------------------------------------------
(0074)    ;@PSoC_UserCode_END@ (Do not change this line.)
(0075) ljmp _Timer16 
    0332: 7D 07 4F LJMP  _Timer16
(0076)    reti
    0335: 7E       RETI  
FILE: lib\timer8.asm
(0001) ;;*****************************************************************************
(0002) ;;*****************************************************************************
(0003) ;;  FILENAME: Timer8.asm
(0004) ;;   Version: 2.4, Updated on 2005/10/05 at 10:27:18
(0005) ;;  Generated by PSoC Designer ver 4.2  b1013 : 02 September, 2004
(0006) ;;
(0007) ;;  DESCRIPTION: Timer8 User Module software implementation file
(0008) ;;               for the 22/24/27/29xxx PSoC family of devices
(0009) ;;
(0010) ;;  NOTE: User Module APIs conform to the fastcall16 convention for marshalling
(0011) ;;        arguments and observe the associated "Registers are volatile" policy.
(0012) ;;        This means it is the caller's responsibility to preserve any values
(0013) ;;        in the X and A registers that are still needed after the API functions
(0014) ;;        returns. For Large Memory Model devices it is also the caller's 
(0015) ;;        responsibility to perserve any value in the CUR_PP, IDX_PP, MVR_PP and 
(0016) ;;        MVW_PP registers. Even though some of these registers may not be modified
(0017) ;;        now, there is no guarantee that will remain the case in future releases.
(0018) ;;-----------------------------------------------------------------------------
(0019) ;;  Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
(0020) ;;*****************************************************************************
(0021) ;;*****************************************************************************
(0022) 
(0023) include "m8c.inc"
(0024) include "memory.inc"
(0025) include "Timer8.inc"
(0026) 
(0027) ;-----------------------------------------------
(0028) ;  Global Symbols
(0029) ;-----------------------------------------------
(0030) export  Timer8_EnableInt
(0031) export _Timer8_EnableInt
(0032) export  Timer8_DisableInt
(0033) export _Timer8_DisableInt
(0034) export  Timer8_Start
(0035) export _Timer8_Start
(0036) export  Timer8_Stop
(0037) export _Timer8_Stop
(0038) export  Timer8_WritePeriod
(0039) export _Timer8_WritePeriod
(0040) export  Timer8_WriteCompareValue
(0041) export _Timer8_WriteCompareValue
(0042) export  Timer8_bReadCompareValue
(0043) export _Timer8_bReadCompareValue
(0044) export  Timer8_bReadTimer
(0045) export _Timer8_bReadTimer
(0046) export  Timer8_bReadTimerSaveCV
(0047) export _Timer8_bReadTimerSaveCV
(0048) 
(0049) ; The following functions are deprecated and subject to omission in future releases
(0050) ;
(0051) export  bTimer8_ReadCompareValue  ; deprecated
(0052) export _bTimer8_ReadCompareValue  ; deprecated
(0053) export  bTimer8_ReadTimer         ; deprecated
(0054) export _bTimer8_ReadTimer         ; deprecated
(0055) export  bTimer8_ReadTimerSaveCV   ; deprecated
(0056) export _bTimer8_ReadTimerSaveCV   ; deprecated
(0057) 
(0058) export  bTimer8_ReadCounter       ; obsolete
(0059) export _bTimer8_ReadCounter       ; obsolete
(0060) export  bTimer8_CaptureCounter    ; obsolete
(0061) export _bTimer8_CaptureCounter    ; obsolete
(0062) 
(0063) 
(0064) AREA clock_timer_good_RAM (RAM,REL)
(0065) 
(0066) ;-----------------------------------------------
(0067) ;  Constant Definitions
(0068) ;-----------------------------------------------
(0069) 
(0070) 
(0071) ;-----------------------------------------------
(0072) ; Variable Allocation
(0073) ;-----------------------------------------------
(0074) 
(0075) 
(0076) AREA UserModules (ROM, REL)
(0077) 
(0078) .SECTION
(0079) ;-----------------------------------------------------------------------------
(0080) ;  FUNCTION NAME: Timer8_EnableInt
(0081) ;
(0082) ;  DESCRIPTION:
(0083) ;     Enables this timer's interrupt by setting the interrupt enable mask bit
(0084) ;     associated with this User Module. This function has no effect until and
(0085) ;     unless the global interrupts are enabled (for example by using the
(0086) ;     macro M8C_EnableGInt).
(0087) ;-----------------------------------------------------------------------------
(0088) ;
(0089) ;  ARGUMENTS:    None.
(0090) ;  RETURNS:      Nothing.
(0091) ;  SIDE EFFECTS: 
(0092) ;    The A and X registers may be modified by this or future implementations
(0093) ;    of this function.  The same is true for all RAM page pointer registers in
(0094) ;    the Large Memory Model.  When necessary, it is the calling function's
(0095) ;    responsibility to perserve their values across calls to fastcall16 
(0096) ;    functions.
(0097) ;
(0098)  Timer8_EnableInt:
(0099) _Timer8_EnableInt:
(0100)    RAM_PROLOGUE RAM_USE_CLASS_1
(0101)    Timer8_EnableInt_M
    0336: 43 E1 01 OR    REG[225],1
(0102)    RAM_EPILOGUE RAM_USE_CLASS_1
(0103)    ret
    0339: 7F       RET   
(0104) 
(0105) .ENDSECTION
(0106) 
(0107) 
(0108) .SECTION
(0109) ;-----------------------------------------------------------------------------
(0110) ;  FUNCTION NAME: Timer8_DisableInt
(0111) ;
(0112) ;  DESCRIPTION:
(0113) ;     Disables this timer's interrupt by clearing the interrupt enable
(0114) ;     mask bit associated with this User Module.
(0115) ;-----------------------------------------------------------------------------
(0116) ;
(0117) ;  ARGUMENTS:    None
(0118) ;  RETURNS:      Nothing
(0119) ;  SIDE EFFECTS: 
(0120) ;    The A and X registers may be modified by this or future implementations
(0121) ;    of this function.  The same is true for all RAM page pointer registers in
(0122) ;    the Large Memory Model.  When necessary, it is the calling function's
(0123) ;    responsibility to perserve their values across calls to fastcall16 
(0124) ;    functions.
(0125) ;
(0126)  Timer8_DisableInt:
(0127) _Timer8_DisableInt:
(0128)    RAM_PROLOGUE RAM_USE_CLASS_1
(0129)    Timer8_DisableInt_M
    033A: 41 E1 FE AND   REG[225],254
(0130)    RAM_EPILOGUE RAM_USE_CLASS_1
(0131)    ret
    033D: 7F       RET   
(0132) 
(0133) .ENDSECTION
(0134) 
(0135) 
(0136) .SECTION
(0137) ;-----------------------------------------------------------------------------
(0138) ;  FUNCTION NAME: Timer8_Start
(0139) ;
(0140) ;  DESCRIPTION:
(0141) ;     Sets the start bit in the Control register of this user module.  The
(0142) ;     timer will begin counting on the next input clock.
(0143) ;-----------------------------------------------------------------------------
(0144) ;
(0145) ;  ARGUMENTS:    None
(0146) ;  RETURNS:      Nothing
(0147) ;  SIDE EFFECTS: 
(0148) ;    The A and X registers may be modified by this or future implementations
(0149) ;    of this function.  The same is true for all RAM page pointer registers in
(0150) ;    the Large Memory Model.  When necessary, it is the calling function's
(0151) ;    responsibility to perserve their values across calls to fastcall16 
(0152) ;    functions.
(0153) ;
(0154)  Timer8_Start:
(0155) _Timer8_Start:
(0156)    RAM_PROLOGUE RAM_USE_CLASS_1
(0157)    Timer8_Start_M
    033E: 43 23 01 OR    REG[35],1
(0158)    RAM_EPILOGUE RAM_USE_CLASS_1
(0159)    ret
    0341: 7F       RET   
(0160) 
(0161) .ENDSECTION
(0162) 
(0163) 
(0164) .SECTION
(0165) ;-----------------------------------------------------------------------------
(0166) ;  FUNCTION NAME: Timer8_Stop
(0167) ;
(0168) ;  DESCRIPTION:
(0169) ;     Disables timer operation by clearing the start bit in the Control
(0170) ;     register.
(0171) ;-----------------------------------------------------------------------------
(0172) ;
(0173) ;  ARGUMENTS:    None
(0174) ;  RETURNS:      Nothing
(0175) ;  SIDE EFFECTS: 
(0176) ;    The A and X registers may be modified by this or future implementations
(0177) ;    of this function.  The same is true for all RAM page pointer registers in
(0178) ;    the Large Memory Model.  When necessary, it is the calling function's
(0179) ;    responsibility to perserve their values across calls to fastcall16 
(0180) ;    functions.
(0181) ;
(0182)  Timer8_Stop:
(0183) _Timer8_Stop:
(0184)    RAM_PROLOGUE RAM_USE_CLASS_1
(0185)    Timer8_Stop_M
    0342: 41 23 FE AND   REG[35],254
(0186)    RAM_EPILOGUE RAM_USE_CLASS_1
(0187)    ret
    0345: 7F       RET   
(0188) 
(0189) .ENDSECTION
(0190) 
(0191) 
(0192) .SECTION
(0193) ;-----------------------------------------------------------------------------
(0194) ;  FUNCTION NAME: Timer8_WritePeriod
(0195) ;
(0196) ;  DESCRIPTION:
(0197) ;     Write the 8-bit period value into the Period register (DR1). If the
(0198) ;     Timer user module is stopped, then this value will also be latched
(0199) ;     into the Count register (DR0).
(0200) ;-----------------------------------------------------------------------------
(0201) ;
(0202) ;  ARGUMENTS: fastcall16 BYTE bPeriodValue (passed in A)
(0203) ;  RETURNS:   Nothing
(0204) ;  SIDE EFFECTS: 
(0205) ;    The A and X registers may be modified by this or future implementations
(0206) ;    of this function.  The same is true for all RAM page pointer registers in
(0207) ;    the Large Memory Model.  When necessary, it is the calling function's
(0208) ;    responsibility to perserve their values across calls to fastcall16 
(0209) ;    functions.
(0210) ;
(0211)  Timer8_WritePeriod:
(0212) _Timer8_WritePeriod:
(0213)    RAM_PROLOGUE RAM_USE_CLASS_1
(0214)    mov   reg[Timer8_PERIOD_REG], A
    0346: 60 21    MOV   REG[33],A
(0215)    RAM_EPILOGUE RAM_USE_CLASS_1
(0216)    ret
    0348: 7F       RET   
(0217) 
(0218) .ENDSECTION
(0219) 
(0220) 
(0221) .SECTION
(0222) ;-----------------------------------------------------------------------------
(0223) ;  FUNCTION NAME: Timer8_WriteCompareValue
(0224) ;
(0225) ;  DESCRIPTION:
(0226) ;     Writes compare value into the Compare register (DR2).
(0227) ;
(0228) ;     NOTE! The Timer user module must be STOPPED in order to write the
(0229) ;           Compare register. (Call Timer8_Stop to disable).

⌨️ 快捷键说明

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