Sample Program 1 For 8-/10-Bit A/D Converter (Ei Os Start In Single-Shot Mode); Fig. 19.12 Flow Of Ei Os Start Program (Single-Shot Mode) - Fujitsu MB90420/5 (A) Series Hardware Manual

F2mc-16lx family 16-bit microcontrollers
Table of Contents

Advertisement

19.8 Sample Program 1 for 8-/10-bit A/D Converter (EI
Sample program for A/D conversion by starting EI
n Sample program for starting EI
• Processing specification
– Analog inputs AN1 to AN3 converted
– Converted data sequentially transferred to addresses 200
– 10-bit resolution
– Software start
Figure 19.12 shows the flow of an EI
• Coding sample
BAPL
EQU
BAPM
EQU
BAPH
EQU
ISCS
EQU
IOAL
EQU
IOAH
EQU
DCTL
EQU
DCTH
EQU
DDR6
EQU
ADER
EQU
ICR10
EQU
ADCSL
EQU
ADCSH
EQU
ADCRL
EQU
ADCRH
EQU
;----------Main program------------------------------------------------------
------
CODE
CSEG
START
AND
MOV
8-/10-BIT A/D CONVERTER
2
OS in single-shot mode
2
OS start program (single-shot mode).
AN1
Start
AN2
AN3
End
2
Fig. 19.12 Flow of EI
; Buffer address pointer lower
000100
H
; Buffer address pointer middle order
000101
H
; Buffer address pointer upper
000102
H
2
; EI
OS Status register
000103
H
; I/O Address register low order
000104
H
; I/O Address register high order
000105
H
; Data counter low order
000106
H
; Data counter high order
000107
H
; Port-6 direction register
000016
H
; Analog input enable register
00001A
H
; A/D Converter interrupt control register
0000BA
H
; A/D Control status register
000020
H
000021
;
H
; A/D Data register
000022
H
000023
;
H
CCR, #0BF
H
ICR10, #00
H
2
OS in the single-shot mode is shown below:
to 205
H
EI
Interrupt
EI
Interrupt
Interrupt
EI
Interrupt sequence
Concurrent
processing
OS Start Program (Single-shot Mode)
; Stack pointer (SP), etc., already initialized
; Interrupts disabled
; Interrupt level = 0 (highest level)
19-23
2
OS Start in Single-shot Mode)
H
2
OS transfer
2
OS transfer
2
OS transfer

Advertisement

Table of Contents
loading

Table of Contents