?? fet140_dma_01.s43
字號:
;******************************************************************************
; MSP-FET430P140 Demo - DMA0 Repeated Burst to-from RAM, Software Trigger
;
; Description; A 16 word block from 220h-240h is transfered to 240h-260h
; using DMA0 in a burst block using software DMAREQ trigger.
; After each transfer, source, destination and DMA size are
; reset to inital software setting because DMA transfer mode 5 is used.
; P1.0 is toggled durring DMA transfer only for demonstration purposes.
; ** RAM location 0x220 - 0x260 used - always make sure no compiler conflict **
; ACLK = n/a, MCLK = SMCLK = default DCO ~ 800k
; //* MSP430F169 Device Required*//
;
; MSP430F169
; -----------------
; /|\| XIN|-
; | | |
; --|RST XOUT|-
; | |
; | P1.0|-->LED
;
; M.Buccini
; Texas Instruments, Inc
; January 2004
;******************************************************************************
#include "msp430x16x.h"
;------------------------------------------------------------------------------
ORG 01100h ; Progam Start
;------------------------------------------------------------------------------
RESET mov.w #0A00h,SP ; Initialize 'x1x9 stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupP1 bis.b #001h,&P1DIR ; P1.0 output
mov.w #0220h,&DMA0SA ; Start block address
mov.w #0240h,&DMA0DA ; Destination block address
mov.w #0010h,&DMA0SZ ; Block size
mov.w #DMADT_5+DMASRCINCR_3+DMADSTINCR_3+DMAEN,&DMA0CTL; Rpt, inc
bis.w #DMAEN,&DMA0CTL ; Enable DMA0
;
Mainloop bis.b #01h,&P1OUT ; P1.0 = 1, LED on
bis.w #DMAREQ,&DMA0CTL ; Trigger block transfer
bic.b #01h,&P1OUT ; P1.0 = 0, LED off
jmp Mainloop ; Again
;
;------------------------------------------------------------------------------
; Interrupt Vectors Used MSP430x15x/16x
;------------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -