Example Of Μdma Start In Stop Mode - Fujitsu F2MC-16LX Hardware Manual

Mb90470 series 16-bit microcontroller
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

CHAPTER 19 8/10-BIT A/D CONVERTER
19.3.3 Example of µ µ µ µ DMA Start in Stop Mode
An example of µ µ µ µ DMA start in stop mode is described below.
I Example of µ µ µ µ DMA start in stop mode
The following example is based on the conditions described below:
Analog input (AN3) is converted 12 times in preset intervals.
Conversion data is transferred to addresses 600
Conversion is started by an external edge
Interrupts have the highest interrupt level
Setting item
µDMA setting
A/D converter setting
µDMA end sequence
ICR14: Interrupt control register
BAPL: Buffer address pointer lower
BAPM: Buffer address pointer middle
BAPH: Buffer address pointer higher
ISCS: Status register
I0A: Address register
DCT: Data counter
372
Sample code
MOV ICR14,#00H
MOV BAPL,#00H
MOV BAPM,#06H
MOV BAPH,#00H
MOV DMACS,#18H
MOV IOA,#48H
MOV DCT,#0CH
MOVW DERL,#8000H
MOV ADCS1,#DBH
MOV ADCS2,#A4H
WBTC io ADCS2:7
MOV ADCS2,#000h
MOVW DSRL,#0000h
RETI
to 618
.
H
H
Operation
Sets highest interrupt level and enables interrupts
Address to transfer conversion data to
Transfers word data and increments the destination
address after transfer.
Data transfer from µDMA to memory
Stores A/D conversion results in registers
Performs three transfers, matching the number of
conversions.
Setting for the µDMA enable register (EN15)
Continuous mode, start channel AN3, end channel AN3
(one-channel conversion)
Start by external edge, start of A/D conversion
Resource interrupt clear
µDMA status register clear
Reset from interrupt
-

Advertisement

Table of Contents
loading

Table of Contents