1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

msp430g2xx1 1 vlo s43

1 116 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1
Dung lượng 2,5 KB

Nội dung

;******************************************************************************* ; MSP430G2xx1 Demo - Software Toggle P1.0, MCLK = VLO/8 ; ; Description; Pulse P1.0 with a 1/100 active duty cycle using software ; Ultra-low frequency ~ 1.5kHz, ultra-low power active mode demonstrated ; ACLK = VL0, MCLK = VLO/8 ~1.5kHz, SMCLK = n/a ; ; MSP430G2xx1 ; ; /|\| XIN|; | | | ; |RST XOUT|; | | ; | P1.0| >LED ; ; D Dang ; Texas Instruments Inc ; October 2010 ; Built with IAR Embedded Workbench Version: 5.10 ;******************************************************************************* #include "msp430g2231.h" ; ORG 0F800h ; Program Reset ; RESET mov.w #0280h,SP ; Initialize stackpointer StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT SetupBC bis.b #LFXT1S_2,&BCSCTL3 ; LFXT1 = VLO SetupOsc bic.b #OFIFG,&IFG1 ; Clear OSC fault flag bis.w #SCG1+SCG0,SR ; Stop DCO bis.b #SELM_3+DIVM_3,&BCSCTL2 ; MCLK = LFXT1/8 SetupP1 mov.b #0FFh,&P1DIR ; All P1.x outputs clr.b &P1OUT ; All P1.x reset SetupP2 mov.b #0FFh,&P2DIR ; All P2.x outputs clr.b &P2OUT ; All P2.x reset ; Mainloop bis.b #001h,&P1OUT ; Set P1.0 Delay1 mov.w #020,R15 ; Delay to R15 L1 dec.w R15 ; jnz L1 ; bic.b #001h,&P1OUT ; Reset P1.0 Delay2 mov.w #02000,R15 ; Delay to R15 L2 dec.w R15 ; jnz L2 ; jmp Mainloop ; Again ; ; ; Interrupt Vectors ; ORG 0FFFEh ; MSP430 RESET Vector DW RESET ; END

Ngày đăng: 26/12/2017, 08:43

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w