Repeat-Sweep Mode 1 - Renesas M16C Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30240 Group

1.2.24.5 Repeat-sweep mode 1

In repeat-sweep mode 1, all pins are used for A-D conversion with emphasis on the pin or pins select-
ed using the A-D sweep pin select bit. Table 1.35 shows the specifications of repeat-sweep mode 1.
Figure 1.103 show the A-D control in repeat-sweep mode 1.
Table 1.35:
Repeat-sweep mode 1 specification
Item
Function
Start condition
Stop condition
Interrupt request generation timing
Input pin
Reading of result of A-D converter
A-D control register 0 (Note)
b7
b6
b5
b4
1 1
A-D control register 1 (Note)
b7
b6
b5
b4
1
0 0
Figure 1.103: A-D conversion register in repeat-sweep mode 1
Rev.1.00 Sep 24, 2003 Page 107 of 360
All pins perform repeat sweep A-D conversion, with emphasis on the pin or
pins selected by the A-D sweep pin select bit
Example: AN
Writing "1" to A-D conversion start flag
Writing "0" to A-D conversion start flag
None generated
AN
(1 pin), AN
0
Read A-D register corresponding to selected pin (at any time)
b3
b2
b1
b0
Symbol
ADCON0
Bit symbol
Bit name
CH0
Analog input pin
CH1
select bit
CH2
A-D operation mode
MD0
select bit 0
MD1
Trigger select bit
TRG
A-D conversion start flag
ADST
Frequency select bit 0
CKS0
Note: If the A-D control register is rewritten during A-D conversion, the conversion result
is indeterminate.
b3
b2
b1
b0
Symbol
1
ADCON1
Bit symbol
Bit name
SCAN0
A-D sweep pin select bit
SCAN1
A-D operation mode
MD2
select bit 1
BITS
8/10-bit mode select bit
CKS1
Frequency select bit 1
VCUT
Vref connect bit
Reserved bit
Note: If the A-D control register is rewritten during A-D conversion, the conversion result
is indeterminate.
Specification
selected AN
AN
AN
0
0 ->
1 ->
and AN
(2 pins), AN
0
1
Address
When reset
03D6
00000XXX
16
2
Function
Invalid in repeat sweep mode 1
b4 b3
1 1 : Repeat sweep mode 1
0 : Software trigger
1 : AD
trigger
TRG
0 : A-D conversion disabled
1 : A-D conversion started
0 : f
/4 is selected
AD
1 : f
/2 is selected
AD
Address
When reset
03D7
00
16
16
Function
When repeat sweep mode 1 is selected
b1 b0
0 0 : AN
(1 pin)
0
0 1 : AN
, AN
(2 pins)
0
1
1 0 : AN
to AN
(3 pins)
0
2
1 1 : AN
to AN
(4 pins)
0
3
1 : Repeat sweep mode 1
0 : 8-bit mode
1 : 10-bit mode
0 : f
/2 or f
/4 is selected
AD
AD
1 : f
is selected
AD
1 : Vref connected
Always set to "0
"
A-D Converter
AN
AN
AN
, etc.
0 ->
2 ->
0 ->
3
to AN
(3 pins), AN
to AN
0
2
0
R
W
R
W
(4 pins)
3

Advertisement

Table of Contents
loading

Table of Contents