Fujitsu MB90460 Series Hardware Manual page 586

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

START:
AND
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
OR
LOOP:
MOV
MOV
BRA
;-------Interrupt
program-------------------------------------------------------------------------------------------------
ED_INT1:
MOV
CODE
;-------Vector setting------------------------------------------------------------------------------------------------------
VECT
CSEG
ORG
DSLED_INT1
ORG
DSL
DB
VECT
ENDS
ENDSTART
;Assumes that the stack pointer (SP) has already
CCR,#0BFH
;Disables interrupts
ICR10,#08H
;Interrupt level; 0 (highest priority). Enables
interrupts
BAPL,#00H
;Sets the address to which conversion data is stored
BAPM,#06H
;(Uses 600H to 60BH.)
BAPH,#00H
;
ISCS,#18H
;Transfers word data, adds 1 to the address, then
;transfers from I/O to memory
IOAL,#36H
;Sets the address of the analog data register as the
IOAH,#00H
;transfer source address pointer
DCTL,#06H
;Six transfers by EI
DDR5,#00000000B
;Sets P50 to P57 as input
ADER,#00111000B
;Sets P53/AN3 to P55/AN5 as analog input
DCTH,#00H
;
ADCS0,#9DH
;Continuous conversion mode. Converts
ADCS1,#0A8H
;Activates the 16-bit timer, starts A/D conversion,
WTMRD1,#0320H
;Sets the timer value to 800 (320H), 100µs
TMCSRH1,#00H
;Sets the clock source to 125 ns and disables
TMCSRL1,#12H
;Disables timer output, disables interrupts, and
enables reload
TMCSRL1,#13H
;Activates the 16-bit reload timer 1
ILM,#07H
;Sets ILM in PS to level 7
CCR,#40H
;Enables interrupts
A,#00H
;Endless loop
A,#01H
LOOP
I:ADCS1,#80H
;Does not stop A/D conversion. Clears and disables
the interrupt flag
RETI
;Returns from interrupt
ENDS
ABS=0FFH
0FFD0H
;Sets vector for interrupt #11 (0BH)
0FFDCH
;Sets reset vector
START
00H
;Sets single-chip mode
CHAPTER 20 8/10-BIT A/D CONVERTER
been initialized
2
OS (two transfers each for three
channels)
AN3 to AN5 CH
and enables interrupts
external trigger
567

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents