Sample Program 1 For The 8/10-Bit A/D Converter (Single Conversion Mode Using Ei 2 Os) - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 20 8/10-BIT A/D CONVERTER
20.8
Sample Program 1 for the 8/10-bit A/D Converter
(Single Conversion Mode Using EI
This section contains a sample program for A/D conversion in single conversion mode
2
using EI
OS.
■ Sample Program for Single Conversion Mode using EI
Processing
• Analog inputs AN1 to AN3 are converted once.
• The conversion data is sequentially transferred to addresses 200
• A resolution of 10 bits is selected.
• The conversion is activated by software.
Figure 20.8-1 shows a flowchart of the program using EI
Figure 20.8-1 Flowchart of Program using EI
Coding example
BAPL
BAPM
BAPH
ISCS
IOAL
IOAH
DCTL
DCTH
DDR5
ADER
ICR00
ADCS0
ADCS1
564
AN1 → Interrupt → EI
Start conversion
AN2 → Interrupt → EI
AN3 → Interrupt → EI
End
EQU
000100H
EQU
000101H
EQU
000102H
EQU
000103H
EQU
000104H
EQU
000105H
EQU
000106H
EQU
000107H
EQU
000015H
EQU
000017H
EQU
0000B0H
EQU
000034H
EQU
000035H
2
OS)
2
OS
to 205
H
2
OS (single conversion mode).
2
OS (Single Conversion Mode)
2
OS transfer
2
OS transfer
2
OS transfer
Interrupt sequence
Parallel processing
;Lower buffer address pointer
;Intermediate buffer address pointer
;Upper buffer address pointer
2
;EI
OS status register
;Lower I/O address register
;Upper I/O address register
;Lower data counter
;Upper data counter
;Port 5 direction register
;Analog input enable register
;Interrupt control register for A/DC
;A/D control status register
;
.
H

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents