Example Of Μdmac Start In Single Mode - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 17 8/10-BIT A/D CONVERTER
17.5.1 Example of μDMAC Start in Single Mode
An example of μDMAC start in the single mode is described below.
Example of μDMAC start in single mode
An example of start operation 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
μDMAC setting
A/D converter setting
μDMAC end
sequence
ICR14: Interrupt control register
BAPL: Buffer address pointer lower
BAPM: Buffer address pointer middle
BAPH: Buffer address pointer higher
ISCS: Status register
IOA:
Address register
DCT:
Data counter
370
Sample program
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
Set DMA control status register (Transfers word data and
increments the destination address after transfer)
Stores A/D conversion results in registers
Performs three transfers, matching the number of
conversions
Setting for the μDMAC enable register (EN15)
Single mode, start channel AN1, end channel AN3
Software start, A/D conversion start
Determines end of A/D conversion
Resource interrupt clear
μDMAC status register clear
Reset from interrupt
sequentially

Advertisement

Table of Contents
loading

Table of Contents