Example Of Μdmac Start In Continuous 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.2 Example of μDMAC Start in Continuous Mode
An example of μDMAC start in the continuous mode is described below.
Example of μDMAC start in continuous mode
Examples of start operation are based on the following conditions:
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
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
372
Sample program
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
Set DMA control status register (Transfers word data and
increments the destination address after transfer)
Stores A/D conversion results in registers
Performs six transfers, matching the number of
conversions
Setting for the μDMAC enable register (EN15)
Single Mode, start channel AN3, end channel AN5
Start by external edge, start of A/D conversion
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