8-/10-BIT A/D CONVERTER
19-27
19.10 Sample Program 3 for 8-/10-Bit A/D Converter (EI
2
OS Start in Stop Mode)
A stop mode program that performs A/D conversion by starting EI
2
OS is shown below:
n
Stop mode sample program to start EI
2
OS
•
Processing specifications
– Analog input AN3 converted 12 times during fixed time period
– Converted data sequentially transferred to addresses 600
H
to 617
H
– 10-bit resolution
– Activation by 16-bit reload timer
Figure 19.14
shows the flow of an EI
2
OS start program (stop mode).
Fig. 19.14 Flow Chart of EI
2
OS Start Program (Stop Mode)
•
Coding sample
BAPL
EQU
000100
H
;
Buffer address pointer lower
BAPM
EQU
000101
H
;
Buffer address pointer middle
BAPH
EQU
000102
H
;
Buffer address pointer higher
ISCS
EQU
000103
H
;
EI
2
OS status register
IOAL
EQU
000104
H
;
I/O address register lower
IOAH
EQU
000105
H
;
I/O address register higher
DCTL
EQU
000106
H
;
Data counter lower
DCTH
EQU
000107
H
;
Data counter higher
DDR6
EQU
000016
H
;
Port 6 direction register
ADER
EQU
00001A
H
;
Analog input enable register
ICR10
EQU
0000B0
H
;
A/D converter interrupt control register
ADCSL
EQU
000020
H
;
A/D control status register
ADCSH
EQU
000021
H
;
ADCRL
EQU
000022
H
;
A/D data register
ADCRH
EQU
000023
H
;
TMCSR1L EQU
000054
H
;
Timer control status register 1 lower
TMCSR1H EQU
000055
H
;
TMRLR1L EQU
000056
H
;
Reload register 1
TMRLR1H EQU
000057
H
;
;----------Main program------------------------------------------------------
------
CODE
CSEG
Start
AN3
Stop
External edge start
Interrupt
EI
2
OS transfer
Totally twelve times
transfer
Interrupt sequence
End
Содержание MB90420/5 (A) Series
Страница 2: ...ii ...
Страница 24: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 1 2 ...
Страница 42: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 2 2 ...
Страница 76: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 2 36 ...
Страница 78: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 3 2 ...
Страница 90: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 4 2 ...
Страница 102: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 4 14 ...
Страница 104: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 5 2 ...
Страница 126: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 5 24 ...
Страница 128: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 6 2 ...
Страница 165: ...7 1 Mode Setting 7 3 7 2 Mode Pins MD2 to MD0 7 4 7 3 Mode Data 7 5 7 MODE SETTING ...
Страница 166: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 7 2 ...
Страница 172: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 8 2 ...
Страница 224: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 9 2 ...
Страница 244: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 10 2 ...
Страница 270: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 11 2 ...
Страница 286: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 12 2 ...
Страница 326: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 13 2 ...
Страница 338: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 14 2 ...
Страница 353: ...LCD CONTROLLER DRIVER 14 17 ...
Страница 365: ...LCD CONTROLLER DRIVER 14 29 ...
Страница 367: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 15 2 ...
Страница 377: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 16 2 ...
Страница 397: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 17 2 ...
Страница 400: ...18 1 Overview of Timepiece Timer 18 3 18 2 Timepiece Timer Registers 18 4 18 TIMEPIECE TIMER ...
Страница 401: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 18 2 ...
Страница 409: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 19 2 ...
Страница 436: ...20 1 Overview of Sound Generator 20 3 20 2 Sound Generator Registers 20 4 20 SOUND GENERATOR ...
Страница 437: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 20 2 ...
Страница 445: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 20 10 ...
Страница 446: ...21 1 Overview of ROM Correction 21 3 21 2 Application Example of ROM Correction 21 6 21 ROM CORRECTION ...
Страница 447: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 21 2 ...
Страница 455: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 21 10 ...
Страница 457: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 22 2 ...
Страница 461: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 23 2 ...
Страница 503: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 23 44 ...
Страница 505: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 24 2 ...
Страница 513: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 24 10 ...
Страница 515: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 25 2 ...
Страница 541: ...MB90420 5 A SERIES F2 MC 16LX FAMILY 16 BIT MICROCONTROLLERS HARDWARE MANUAL 26 2 ...