Example Of Μdma Start In Single 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.1 Example of µ µ µ µ DMA Start in Single Mode
An example of µ µ µ µ DMA start in The Single Mode is described below.
I Example of µ µ µ µ DMA start in single mode
The following example is based on the conditions described below:
Conversion finishes after conversion up to analog input (AN1 to AN3).
Conversion data is transferred to addresses 200
Start by software
The highest interrupt level is used
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
Figure 19.3-2 "Sample operation flow for µDMA operation in single mode" shows an example of
the operational flow for start of conversion.
368
Sample code
MOV ICR14,#00H
MOV BAPL,#00H
MOV BAPM,#02H
MOV BAPH,#00H
MOV DMACS,#18H
MOV IOA,#48H
MOV DCT,#03H
MOVW DERL,#8000H
MOV ADCS1,#0BH
MOV ADCS2,#A2H
WBTC io ADCS2:7
MOV ADCS2,#000h
MOVW DSRL,#0000h
RETI
to 206
.
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)
Single mode, start channel AN1, end channel AN3
Software start, A/D conversion start
Resource interrupt clear
µDMA status register clear
Reset from interrupt
-

Advertisement

Table of Contents
loading

Table of Contents