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

msp430g2xx1 ta 10 s43

1 92 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,24 KB

Nội dung

;******************************************************************************* ; MSP430G2xx1 Demo - Timer_A, Toggle P1.1/TA0, Up Mode, DCO SMCLK ; ; Description: Toggle P1.1 using hardware TA0 output Timer_A is configured ; for up mode with CCR0 defining period, TA0 also output on P1.1 In this ; example, CCR0 is loaded with 500 and TA0 will toggle P1.1 at TACLK/500 ; Thus the output frequency on P1.1 will be the TACLK/1000 No CPU or ; software resources required ; As coded with TACLK = SMCLK, P1.1 output frequency is ~1000000/1000 ; SMCLK = MCLK = TACLK = default DCO ; ; MSP430G2xx1 ; ; /|\| XIN|; | | | ; |RST XOUT|; | | ; | P1.1/TA0| > SMCLK/1000 ; ; 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 SetupP1 bis.b #002h,&P1DIR ; P1.1 output bis.b #002h,&P1SEL ; P1.1 option slect SetupC0 mov.w #OUTMOD_4,&CCTL0 ; CCR0 toggle, upmode mov.w #500-1,&CCR0 ; SetupTA mov.w #TASSEL_2+MC_1,&TACTL ; SMCLK, clear TAR ; Mainloop bis.w #CPUOFF,SR ; CPU off nop ; Required only for debugger ; ; ; Interrupt Vectors ; ORG 0FFFEh ; MSP430 RESET Vector DW RESET ; END

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

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

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN

w