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

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 20 8/10-BIT A/D CONVERTER
20.10 Sample Program 3 for the 8/10-bit A/D Converter
(Stop Conversion Mode Using EI
This section contains a sample program for A/D conversion in stop conversion mode
2
using EI
OS.
■ Sample Program for Stop Conversion Mode using EI
Processing
• Analog input AN3 is converted 12 times at regular intervals.
• The conversion data is sequentially transferred to addresses 600
• A resolution of 10 bits is selected.
• The conversion is activated by 16-bit reload timer 1.
Figure 20.10-1 shows a flowchart of the program using EI
Figure 20.10-1 Flowchart of Program using EI
Start conversion
Coding example
BAPL
BAPM
BAPH
ISCS
IOAL
IOAH
DCTL
DCTH
DDR5
ADER
ICR00
ADCS0
ADCS1
ADCR0
ADCR1
TMCSRL1
TMCSRH1
568
AN3 → Interrupt → EI
Stop
Activation by 16-bit reload timer 1
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
EQU
000036H
EQU
000037H
EQU
000086H
EQU
000087H
2
OS)
2
OS
to 617
H
2
OS (stop conversion mode).
2
OS (Stop Conversion Mode)
2
OS transfer
;Lower buffer address pointer
;Middle 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
;
;A/D data register
;
;Lower control status register 1
;
.
H
After 12 transfers
Interrupt sequence
End

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents