?? fet140_dma_02.s43
字號:
;******************************************************************************
; MSP430F169 Demo - DMA0 Repeated Block To P1OUT, CCR2IFG Trigger
;
; Description; DMA0 is used to transfer a string byte-by-byte as a repeating
; block to P1OUT. Timer_A operates continuosly at ~800Hz with CCR2IFG
; triggering DMA0. The effect is P1.0/1.1 toggling at different frequencies.
; ACLK = n/a, MCLK = SMCLK = TACLK = default DCO ~ 800k
;
; MSP430F169
; -----------------
; /|\| XIN|-
; | | |
; --|RST XOUT|-
; | |
; | P1.0|--> LED
; | P1.1|-->
;
; M.Buccini
; Texas Instruments, Inc
; January 2004
;******************************************************************************
#include "msp430x16x.h"
;------------------------------------------------------------------------------
ORG 01100h ; Progam Start
;------------------------------------------------------------------------------
RESET mov.w #0A00h,SP ; Initialize 'F1x9 stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupP1 bis.b #003h,&P1DIR ; P1.0/1.1 output
SetupDMA0 mov.w #DMA0TSEL_1,&DMACTL0 ; CCR2 trigger
mov.w #testconst,&DMA0SA ; Source block address
mov.w #P1OUT,&DMA0DA ; Destination single address
mov.w #06h,&DMA0SZ ; Block size
mov.w #DMADT_4+DMASRCINCR_3+DMASBDB+DMAEN,&DMA0CTL; Rpt, inc src
SetupTA mov.w #TASSEL_2+MC_2,&TACTL ; SMCLK/4, contmode
;
Mainloop bis.w #CPUOFF,SR ;
nop ; Required only for debugger
;
testconst DB 00h,03h,02h,03h,00h,01h
;
;-----------------------------------------------------------------------------
; Interrupt Vectors Used MSP430x15x/16x
;-----------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -