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

📄 adcinc.asm

📁 利用psoc进行usb及capsense的程序编写
💻 ASM
📖 第 1 页 / 共 2 页
字号:
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;
 ADCINC_StopADC:
_ADCINC_StopADC:
   RAM_PROLOGUE RAM_USE_CLASS_1
   M8C_SetBank1
   and reg[E7h], 3Fh             ; if we are in 29xxx or 24x94   
   or  reg[E7h], 80h             ; then set to incremental Mode
   M8C_SetBank0
   ADCINC_STOPADC_M
   ADCINC_RESET_INTEGRATOR_M
   RAM_EPILOGUE RAM_USE_CLASS_1 
   ret
.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: ADCINC_fIsDataAvailable
;
;  DESCRIPTION: Returns the status of the A/D Data
;-----------------------------------------------------------------------------
;  ARGUMENTS:    None.
;  RETURNS:      fastcall BOOL DataAvailable returned in the A register
;  SIDE EFFECTS:
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;          
;    Currently only the page pointer registers listed below are modified: 
;          CUR_PP
;
 ADCINC_fIsDataAvailable:
_ADCINC_fIsDataAvailable:
   RAM_PROLOGUE RAM_USE_CLASS_4
   ADCINC_fIsDataAvailable_M   
   RAM_EPILOGUE RAM_USE_CLASS_4
   ret
.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME:  ADCINC_iClearFlagGetData
;                  ADCINC_wClearFlagGetData
;
;  DESCRIPTION:    Clears the fStatus and places ADC data in iResult A/D.
;                  Flag is checked after trandfer to insure valid data.
;                  available. Also clears the DATA_READY flag. 
;-----------------------------------------------------------------------------
;  ARGUMENTS:    None.
;  RETURNS:      fastcall int iResult returned in the X and A register
;  SIDE EFFECTS:
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;          
;    Currently only the page pointer registers listed below are modified: 
;          CUR_PP
;
 ADCINC_iClearFlagGetData:
_ADCINC_iClearFlagGetData:
 ADCINC_wClearFlagGetData:
_ADCINC_wClearFlagGetData:
   RAM_PROLOGUE RAM_USE_CLASS_4
   ADCINC_iClearFlagGetData_M   
   RAM_EPILOGUE RAM_USE_CLASS_4
   ret
.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME:  ADCINC_cClearFlagGetData
;                  ADCINC_bClearFlagGetData
;
;  DESCRIPTION:    Clears the fStatus and places ADC data in iResult A/D.
;-----------------------------------------------------------------------------
;  ARGUMENTS:    None.
;  RETURNS:      fastcall int iResult returned in the X and A register
;  SIDE EFFECTS:
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;          
;    Currently only the page pointer registers listed below are modified: 
;          CUR_PP
;
 ADCINC_cClearFlagGetData:
_ADCINC_cClearFlagGetData:
 ADCINC_bClearFlagGetData:
_ADCINC_bClearFlagGetData:
   RAM_PROLOGUE RAM_USE_CLASS_4
   ADCINC_bClearFlagGetData_M     
   RAM_EPILOGUE RAM_USE_CLASS_4
   ret
.ENDSECTION
.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME:  ADCINC_iGetData
;				   ADCINC_wGetData
;
;  DESCRIPTION:     Returns the data from the A/D.  Does not check if data is
;                   available.
;-----------------------------------------------------------------------------
;  ARGUMENTS:    None.
;  RETURNS:      fastcall int iResult is returned in the X,A registers
;  SIDE EFFECTS:
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;          
;    Currently only the page pointer registers listed below are modified: 
;          CUR_PP
;
 ADCINC_iGetData:
_ADCINC_iGetData:
 ADCINC_wGetData:
_ADCINC_wGetData:
   RAM_PROLOGUE RAM_USE_CLASS_4
   ADCINC_wGetData_M          
   RAM_EPILOGUE RAM_USE_CLASS_4
   ret
.ENDSECTION
.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME:  ADCINC_bGetData
;                  ADCINC_cGetData
;
;  DESCRIPTION:     Returns the data from the A/D.  Does not check if data is
;                   available.
;-----------------------------------------------------------------------------
;  ARGUMENTS:    None.
;  RETURNS:      fastcall CHAR cData returned in the A register
;  SIDE EFFECTS:
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;          
;    Currently only the page pointer registers listed below are modified: 
;          CUR_PP
;
 ADCINC_bGetData:
_ADCINC_bGetData:
 ADCINC_cGetData:
_ADCINC_cGetData:
   RAM_PROLOGUE RAM_USE_CLASS_4
   ADCINC_cGetData_M        
   RAM_EPILOGUE RAM_USE_CLASS_4
   ret
.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: ADCINC_fClearFlag
;
;  DESCRIPTION: Clears the data ready flag.
;-----------------------------------------------------------------------------
;  ARGUMENTS:    None.
;  RETURNS:      Nothing.
;  SIDE EFFECTS: 
;    The DATA_READY flag is cleared.
;    
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;          
;    Currently only the page pointer registers listed below are modified: 
;          CUR_PP
;
 ADCINC_fClearFlag:
_ADCINC_fClearFlag:
   RAM_PROLOGUE RAM_USE_CLASS_4
   ADCINC_fClearFlag_M    
   RAM_EPILOGUE RAM_USE_CLASS_4
   ret
.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: ADCINC_WritePulseWidth
;
;  DESCRIPTION:
;     Write the 8-bit period value into the compare register (DR2).
;-----------------------------------------------------------------------------
;
;  ARGUMENTS: fastcall BYTE bPeriodValue (passed in A)
;  RETURNS:   Nothing
;  SIDE EFFECTS:
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;
 ADCINC_WritePulseWidth:
_ADCINC_WritePulseWidth:
   RAM_PROLOGUE RAM_USE_CLASS_1
   ADCINC_WritePulseWidth_M  
   RAM_EPILOGUE RAM_USE_CLASS_1
   ret
.ENDSECTION

; End of File ADCINC.asm

⌨️ 快捷键说明

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