Fujitsu F2MC-16LX Hardware Manual page 466

16-bit microcontroller mb90330 series
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

CHAPTER 19 8/10-BIT A/D CONVERTER
ADCS0
ADCS1
ADCR0
ADCR1
;----------Main Program------------------------------------------------------------
CODE
START:
LOOP:
;----------Interrupt Program------------------------------------------------------------
ED_INT1:
CODE
;----------Vector Settings------------------------------------------------------------------
VECT
450
EQU
000040H
EQU
000041H
EQU
000042H
EQU
000043H
CSEG
AND
CCR, #0BFH
MOV
ICR12, #00H
MOV
BAPL, #00H
MOV
BAPM, #02H
MOV
BAPH, #00H
MOV
ISCS, #18H
MOV
IOAL, #42H
MOV
IOAH, #00H
MOV
DCTL, #03H
MOV
DDR7, #11110001B
MOV
DCTH, #00H
MOV
ADER0, #00001110B
MOV
ADMR, #013H
MOV
ADCSL, #000H
MOV
ADCSH, #0A2H
MOV
ILM, #07H
OR
CCR, #40H
MOV
A,#00H
MOV
A,#01H
BRA
LOOP
MOV
I:ADCS1, #00H
RETI
ENDS
CSEG
ABS=0FFH
ORG
0FF6CH
DSL
ED_INT1
; A/D Control status register
;
; A/D data register
;
; Stack pointer (SP), etc. shall be initialized.
; Disables the interrupt.
; Interrupt levels (0 strength)
; Setting the converted data storage address
; (uses 200
to 205
)
H
H
;
; Transferring the word data, Transferred address + 1,
; I/O → Transfer to the memory
; As forwarding former address pointer
; Setting analog data register address
2
; Transferring the EI
OS for three times, Performing
; the conversion for the same number of times.
; P71 to P73 are set to input.
;
; P71/AN1 to P73/AN3 are set in the analog input.
; AN1 to AN3 CH are converted
; Single startup
; Starting the software, Starting the A/D conversion,
; Enabling the interrupt
; Sets ILM in PS to level 7
; Interruption permission
; Infinite loop
; Stopping the A/D, Disabling the interrupt and the
; flag clearance
; Returns from interrupt.
; The vector is set in interruption #36(24
).
H

Advertisement

Table of Contents
loading

Table of Contents