?? slopad.s43
字號:
/******************************************************************************/
//File:SlopAD.s43
/*****************************************************************************/
#include "msp430x41x.h"
NAME SlopeAD
;====================================================
; SlopeAD
;====================================================
PUBLIC SlopeAD ; Declare symbol to be exported
RSEG CODE ; Code is relocated
SlopeAD
bis.b #02h,&P2OUT
mov #04096,R15 ; Integrate 1-bit DAC 4096 COUNTS
mov #00h,R14;
Pre_DisC bic.b #02h,&P2OUT ; Pre_Discharge to the voltage
dec R15 ;
jz MEAS_OVER
bit.b #CAOUT,&CACTL2 ;
jz Pre_DisC ;
Pre_C bis.b #02h,&P2OUT ; Pre_charge to the voltage
bit.b #CAOUT,&CACTL2 ;
jnz Pre_C ;
mov #04096,R15
Pluse bit.b #CAOUT,&CACTL2
jnc High1
Low1 bis.b #02h,&P2OUT ; charge
nop ; charge circle=discharge circle
dec R15
jnz Pluse
jmp MEAS_OVER
High1 bic.b #02h,&P2OUT ; discharge
inc R14 ;
dec R15 ;
jnz Pluse
MEAS_OVER mov R14,R12 ; return the result
bic.b #02h,&P2OUT
Ret
END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -