Example Of Μdma Start In Continuous 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.2 Example of µ µ µ µ DMA Start in Continuous Mode
An example of µ µ µ µ DMA start in the continuous mode is described below.
I Example of µ µ µ µ DMA start in continuous mode
The following example of start operation is based on the conditions described below:
Analog input (AN3 to AN5) is converted, and two items of data for conversion are obtained
from each channel.
Conversion data is transferred to addresses 600
Start by an external edge
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
370
Sample code
MOV ICR14,#00H
MOV BAPL,#00H
MOV BAPM,#06H
MOV BAPH,#00H
MOV DMACS,#18H
MOV IOA,#48H
MOV DCT,#06H
MOVW DERL,#8000H
MOV ADCS1,#9DH
MOV ADCS2,#A4H
WBTC io ADCS2:7
MOV ADCS2,#000h
MOVW DSRL,#0000h
RETI
to 60C
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 six transfers, matching the number of
conversions.
Setting for the µDMA enable register (EN15)
Single Mode, start channel AN3, end channel AN5
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