?? 實驗8_思考_bt_2.s43
字號:
#include "msp430x44x.h"
;******************************************************************************
; MSP-Test44x Demo - BasicTimer Toggle P5.1 using ISR, 32kHz ACLK
;
; Description; This program will toggle P5.1 by xor'ing P5.1 inside of
; a basic timer ISR. ACLK used to clock basic timer.
; ACLK = LFXT1 = 32768, MCLK = SMCLK = DCO =32xACLK = 1.048576MHz
; //*An external watch crystal on XIN XOUT is required for ACLK*//
;
; MSP430F449
; -----------------
; /|\| XIN|-
; | | | 32k
; --|RST XOUT|-
; | |
; | P5.1|-->LED
;
;------------------------------------------------------------------------------
ORG 01100h ; Program Start
;------------------------------------------------------------------------------
RESET mov.w #0A00h,SP ; Initialize '449 stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupFLL bis.b #XCAP14PF,&FLL_CTL0 ; Configure load caps
SetupBT mov.b #BTDIV+BTIP1+BTIP0,&BTCTL ; 125ms Int.
bis.b #BTIE,&IE2 ; Enable Basic Timer interrupt
SetupP5 bis.b #002h,&P5DIR ; P5.1 output
eint ; Enable interrupts
;
Mainloop bis.w #LPM3,SR ; Remain in LPM3
nop ; Required only for C-spy
;
;------------------------------------------------------------------------------
BT_ISR; Toggle P5.1
;------------------------------------------------------------------------------
xor.b #002h,&P5OUT ; Toggle P5.1
reti ;
;
;-----------------------------------------------------------------------------
; Interrupt Vectors Used MSP430x44x
;-----------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
ORG 0FFE0h ; BT Vector
DW BT_ISR ;
END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -