![Renesas R8C series Скачать руководство пользователя страница 183](http://html1.mh-extra.com/html/renesas/r8c-series/r8c-series_hardware-manual_1440345183.webp)
R8C/18 Group, R8C/19 Group
16. Comparator
Rev.1.30
Apr 14, 2006
Page 168 of 233
REJ09B0222-0130
Figure 16.4
Registers ADCON0 and ADCON1 in One-Shot Mode
A/D Control Register 0
(1)
Symbol
Address
After Reset
ADCON0
00D6h
00000XXXb
Bit Symbol
Bit Name
Function
RW
NOTES:
1.
2.
3.
4.
5.
b0
1
0
b3 b2 b1
MD
Comparator conversion
operating mode select bit
(3)
b7 b6 b5 b4
1
CH2
RW
Analog input pin select
bits
(2)
b2 b1 b0
1 0 0 : AN8
1 0 1 : AN9
1 1 0 : AN10
1 1 1 : AN11
Other than above : Do not set.
0 : One-shot mode
RW
RW
ADGSEL0
RW
Analog input group select
bit
(5)
0 : Disabled
1 : Enabled (AN8 to AN11)
CH1
RW
CH0
ADCAP
Comparator conversion
automatic start bit
0 : Starts at softw are trigger (ADST bit).
1 : Starts at capture (requests timer Z interrupt).
RW
ADST
Comparator conversion
start flag
0 : Disables comparator conversion.
1 : Starts comparator conversion.
RW
To use the comparator, set the ADGSEL0 bit to 1.
When changing comparator conversion operating mode, set the analog input pin again.
Set the øAD frequency to 10 MHz or below .
CKS0
Frequency select bit 0
[When CKS1 in ADCON1 register = 0]
0 : Selects f4.
1 : Selects f2.
[When CKS1 in ADCON1 register = 1]
0 : Selects f1.
(4)
1 : fRING-fast
RW
If the ADCON0 register is rew ritten during comparator conversion, the conversion result is undefined.
Bits CH0 to CH2 are enabled w hen the ADGSEL0 bit is set to 1. After setting the ADGSEL0 bit to 1, w rite to bits CH0
to CH2.
A/D Control Register 1
(1)
Symbol
Address
After Reset
ADCON1
00D7h
00h
Bit Symbol
Bit Name
Function
RW
NOTE:
1.
RW
Set to 0.
Frequency select bit 1
Reserved bits
Set to 0.
If the ADCON1 register is rew ritten during comparator conversion, the conversion result is undefined.
CKS1
RW
RW
—
(b7-b5)
Reserved bits
0 0 0
b7 b6 b5 b4
0
0
0
Refer to the description of the CKS0 bit in the
ADCON0 register function
—
(b3-b0)
0
b3 b2 b1 b0