📄 lcd122x32.lst
字号:
04AA: 09 00 ADC A,0
(0167) jmp LoadConfigLp ; loop to configure another register
04AC: 8F D7 JMP 0x0484
(0168) EndLoadConfig:
(0169) add SP, -4
04AE: 38 FC ADD SP,252
(0170) RAM_EPILOGUE RAM_USE_CLASS_2
(0171) ret
04B0: 7F RET
FILE: lib\pwm8_2int.asm
(0001) ;;*****************************************************************************
(0002) ;;*****************************************************************************
(0003) ;; FILENAME: PWM8_2INT.asm
(0004) ;; Version: 2.3, Updated on 2004/07/19 at 16:37:39
(0005) ;; Generated by PSoC Designer ver 4.2 b1013 : 02 September, 2004
(0006) ;;
(0007) ;; DESCRIPTION: PWM8 Interrupt Service Routine
(0008) ;;-----------------------------------------------------------------------------
(0009) ;; Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
(0010) ;;*****************************************************************************
(0011) ;;*****************************************************************************
(0012)
(0013) include "m8c.inc"
(0014) include "PWM8_2.inc"
(0015) include "memory.inc"
(0016)
(0017)
(0018) ;-----------------------------------------------
(0019) ; Global Symbols
(0020) ;-----------------------------------------------
(0021) export _PWM8_2_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: _PWM8_2_ISR
(0056) ;
(0057) ; DESCRIPTION: Unless modified, this implements only a null handler stub.
(0058) ;
(0059) ;-----------------------------------------------------------------------------
(0060) ;
(0061)
(0062) _PWM8_2_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)
(0076) reti
04B1: 7E RETI
FILE: lib\pwm8_2.asm
(0001) ;;*****************************************************************************
(0002) ;;*****************************************************************************
(0003) ;; FILENAME: PWM8_2.asm
(0004) ;; Version: 2.3, Updated on 2004/07/19 at 16:37:39
(0005) ;; Generated by PSoC Designer ver 4.2 b1013 : 02 September, 2004
(0006) ;;
(0007) ;; DESCRIPTION: PWM8 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 "PWM8_2.inc"
(0025) include "memory.inc"
(0026)
(0027) ;-----------------------------------------------
(0028) ; Global Symbols
(0029) ;-----------------------------------------------
(0030) export PWM8_2_EnableInt
(0031) export _PWM8_2_EnableInt
(0032) export PWM8_2_DisableInt
(0033) export _PWM8_2_DisableInt
(0034) export PWM8_2_Start
(0035) export _PWM8_2_Start
(0036) export PWM8_2_Stop
(0037) export _PWM8_2_Stop
(0038) export PWM8_2_WritePeriod
(0039) export _PWM8_2_WritePeriod
(0040) export PWM8_2_WritePulseWidth
(0041) export _PWM8_2_WritePulseWidth
(0042) export PWM8_2_bReadPulseWidth
(0043) export _PWM8_2_bReadPulseWidth
(0044) export PWM8_2_bReadCounter
(0045) export _PWM8_2_bReadCounter
(0046)
(0047) ; The following functions are deprecated and subject to omission in future releases
(0048) ;
(0049) export bPWM8_2_ReadPulseWidth ; deprecated
(0050) export _bPWM8_2_ReadPulseWidth ; deprecated
(0051) export bPWM8_2_ReadCounter ; deprecated
(0052) export _bPWM8_2_ReadCounter ; deprecated
(0053)
(0054)
(0055) AREA lcd122x32_RAM (RAM,REL)
(0056)
(0057) ;-----------------------------------------------
(0058) ; Constant Definitions
(0059) ;-----------------------------------------------
(0060)
(0061) INPUT_REG_NULL: equ 0x00 ; Clear the input register
(0062)
(0063)
(0064) ;-----------------------------------------------
(0065) ; Variable Allocation
(0066) ;-----------------------------------------------
(0067)
(0068)
(0069) AREA UserModules (ROM, REL)
(0070)
(0071) .SECTION
(0072) ;-----------------------------------------------------------------------------
(0073) ; FUNCTION NAME: PWM8_2_EnableInt
(0074) ;
(0075) ; DESCRIPTION:
(0076) ; Enables this PWM's interrupt by setting the interrupt enable mask bit
(0077) ; associated with this User Module. This function has no effect until and
(0078) ; unless the global interrupts are enabled (for example by using the
(0079) ; macro M8C_EnableGInt).
(0080) ;-----------------------------------------------------------------------------
(0081) ;
(0082) ; ARGUMENTS: None.
(0083) ; RETURNS: Nothing.
(0084) ; SIDE EFFECTS:
(0085) ; The A and X registers may be modified by this or future implementations
(0086) ; of this function. The same is true for all RAM page pointer registers in
(0087) ; the Large Memory Model. When necessary, it is the calling function's
(0088) ; responsibility to perserve their values across calls to fastcall16
(0089) ; functions.
(0090) ;
(0091) PWM8_2_EnableInt:
(0092) _PWM8_2_EnableInt:
(0093) RAM_PROLOGUE RAM_USE_CLASS_1
(0094) PWM8_2_EnableInt_M
04B2: 43 E1 02 OR REG[225],2
(0095) RAM_EPILOGUE RAM_USE_CLASS_1
(0096) ret
04B5: 7F RET
(0097)
(0098)
(0099) .ENDSECTION
(0100)
(0101) .SECTION
(0102) ;-----------------------------------------------------------------------------
(0103) ; FUNCTION NAME: PWM8_2_DisableInt
(0104) ;
(0105) ; DESCRIPTION:
(0106) ; Disables this PWM's interrupt by clearing the interrupt enable
(0107) ; mask bit associated with this User Module.
(0108) ;-----------------------------------------------------------------------------
(0109) ;
(0110) ; ARGUMENTS: None
(0111) ; RETURNS: Nothing
(0112) ; SIDE EFFECTS:
(0113) ; The A and X registers may be modified by this or future implementations
(0114) ; of this function. The same is true for all RAM page pointer registers in
(0115) ; the Large Memory Model. When necessary, it is the calling function's
(0116) ; responsibility to perserve their values across calls to fastcall16
(0117) ; functions.
(0118) ;
(0119) PWM8_2_DisableInt:
(0120) _PWM8_2_DisableInt:
(0121) RAM_PROLOGUE RAM_USE_CLASS_1
(0122) PWM8_2_DisableInt_M
04B6: 41 E1 FD AND REG[225],253
(0123) RAM_EPILOGUE RAM_USE_CLASS_1
(0124) ret
04B9: 7F RET
(0125)
(0126)
(0127) .ENDSECTION
(0128)
(0129) .SECTION
(0130) ;-----------------------------------------------------------------------------
(0131) ; FUNCTION NAME: PWM8_2_Start
(0132) ;
(0133) ; DESCRIPTION:
(0134) ; Sets the start bit in the Control register of this user module. The
(0135) ; PWM will begin counting on the next input clock as soon as the
(0136) ; enable input is asserted high.
(0137) ;-----------------------------------------------------------------------------
(0138) ;
(0139) ; ARGUMENTS: None
(0140) ; RETURNS: Nothing
(0141) ; SIDE EFFECTS:
(0142) ; The A and X registers may be modified by this or future implementations
(0143) ; of this function. The same is true for all RAM page pointer registers in
(0144) ; the Large Memory Model. When necessary, it is the calling function's
(0145) ; responsibility to perserve their values across calls to fastcall16
(0146) ; functions.
(0147) ;
(0148) PWM8_2_Start:
(0149) _PWM8_2_Start:
(0150) RAM_PROLOGUE RAM_USE_CLASS_1
(0151) PWM8_2_Start_M
04BA: 43 27 01 OR REG[39],1
(0152) RAM_EPILOGUE RAM_USE_CLASS_1
(0153) ret
04BD: 7F RET
(0154)
(0155)
(0156) .ENDSECTION
(0157)
(0158) .SECTION
(0159) ;-----------------------------------------------------------------------------
(0160) ; FUNCTION NAME: PWM8_2_Stop
(0161) ;
(0162) ; DESCRIPTION:
(0163) ; Disables PWM operation by clearing the start bit in the Control
(0164) ; register.
(0165) ;-----------------------------------------------------------------------------
(0166) ;
(0167) ; ARGUMENTS: None
(0168) ; RETURNS: Nothing
(0169) ; SIDE EFFECTS:
(0170) ; The A and X registers may be modified by this or future implementations
(0171) ; of this function. The same is true for all RAM page pointer registers in
(0172) ; the Large Memory Model. When necessary, it is the calling function's
(0173) ; responsibility to perserve their values across calls to fastcall16
(0174) ; functions.
(0175) ;
(0176) PWM8_2_Stop:
(0177) _PWM8_2_Stop:
(0178) RAM_PROLOGUE RAM_USE_CLASS_1
(0179) PWM8_2_Stop_M
04BE: 41 27 FE AND REG[39],254
(0180) RAM_EPILOGUE RAM_USE_CLASS_1
(0181) ret
04C1: 7F RET
(0182)
(0183)
(0184) .ENDSECTION
(0185)
(0186) .SECTION
(0187) ;-----------------------------------------------------------------------------
(0188) ; FUNCTION NAME: PWM8_2_WritePeriod
(0189) ;
(0190) ; DESCRIPTION:
(0191) ; Write the 8-bit period value into the Period register (DR1).
(0192) ;-----------------------------------------------------------------------------
(0193) ;
(0194) ; ARGUMENTS: fastcall16 BYTE bPeriodValue (passed in A)
(0195) ; RETURNS: Nothing
(0196) ; SIDE EFFECTS:
(0197) ; If the PWM user module is stopped, then this value will also be
(0198) ; latched into the Count register (DR0).
(0199) ;
(0200) ; The A and X registers may be modified by this or future implementations
(0201) ; of this function. The same is true for all RAM page pointer registers in
(0202) ; the Large Memory Model. When necessary, it is the calling function's
(0203) ; responsibility to perserve their values across calls to fastcall16
(0204) ; functions.
(0205) ;
(0206) PWM8_2_WritePeriod:
(0207) _PWM8_2_WritePeriod:
(0208) RAM_PROLOGUE RAM_USE_CLASS_1
(0209) mov reg[PWM8_2_PERIOD_REG], A
04C2: 60 25 MOV REG[37],A
(0210) RAM_EPILOGUE RAM_USE_CLASS_1
(0211) ret
04C4: 7F RET
(0212)
(0213)
(0214) .ENDSECTION
(0215)
(0216) .SECTION
(0217) ;-----------------------------------------------------------------------------
(0218) ; FUNCTION NAME: PWM8_2_WritePulseWidth
(0219) ;
(0220) ; DESCRIPTION:
(0221) ; Writes compare value into the Compare register (DR2).
(0222) ;-----------------------------------------------------------------------------
(0223) ;
(0224) ; ARGUMENTS: fastcall16 BYTE bCompareValue (passed in A)
(0225) ; RETURNS: Nothing
(0226) ; SIDE EFFECTS:
(0227) ; The A and X registers may be modified by this or future implementations
(0228) ; of this function. The same is true for all RAM page pointer registers in
(0229) ; the Large Memory Model. When necessary, it is the calling function's
(0230) ; responsibility to perserve their values across calls to fastcall16
(0231) ; functions.
(0232) ;
(0233) PWM8_2_WritePulseWidth:
(0234) _PWM8_2_WritePulseWidth:
(0235) RAM_PROLOGUE RAM_USE_CLASS_1
(0236) mov reg[PWM8_2_COMPARE_REG], A
04C5: 60 26 MOV REG[38],A
(0237) RAM_EPILOGUE RAM_USE_CLASS_1
(0238) ret
04C7: 7F RET
(0239)
(0240)
(0241) .ENDSECTION
(0242)
(0243) .SECTION
(0244) ;-------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -