Operating Modes; One-Shot Mode - Renesas M16C/29 Series User Manual

Hide thumbs Also See for M16C/29 Series:
Table of Contents

Advertisement

M
1
6
C
2 /
9
G
o r
u
p

15.1 Operating Modes

15.1.1 One-Shot Mode

In one-shot mode, analog voltage applied to a selected pin is once converted to a digital code. Table
15.3 shows the one-shot mode specifications. Figure 15.6 shows the operation example in one-shot
mode. Figure 15.7 shows registers ADCON0 to ADCON2 in one-shot mode.
Table 15.3 One-shot Mode Specifications
Item
Function
A/D Conversion Start
Condition
A/D Conversion Stop
Condition
Interrupt Request Generation Timing A/D conversion completed
Analog Input Pin
Readout of A/D Conversion Result
•Example when selecting AN
A/D conversion started
AN
0
AN
1
AN
2
AN
3
AN
4
AN
5
AN
6
AN
7
Figure 15.6 Operation Example in One-Shot Mode
R
e
. v
1
1 .
2
M
r a
3 .
, 0
2
0
0
7
R
E
J
0
9
B
0
1
0
1
0 -
1
1
2
Bits CH2 to CH0 in the ADCON0 register and registers ADGSEL1 and
ADGSEL0 in the ADCON2 register select pins. Analog voltage applied to a
selected pin is once converted to a digital code
• When the TRG bit in the ADCON0 register is 0 (software trigger)
Set the ADST bit in the ADCON0 register to 1 (A/D conversion started)
• When the TRG bit in the ADCON0 register is 1 (hardware trigger)
The AD
pin input changes state from "H" to "L" after setting the
TRG
ADST bit to 1 (A/D conversion started)
• A/D conversion completed (If a software trigger is selected, the ADST bit is
set to 0 (A/D conversion halted)).
• Set the ADST bit to 0
Select one pin from AN
Readout one of registers AD0 to AD7 that corresponds to the selected pin
to an analog input pin (Ch2 to CH0 = 010
2
A/D interrupt request generated
page 228
f o
4
5
8
Specification
to AN
, AN0
to AN0
0
7
0
7
15. A/D Converter
, AN2
to AN2
, AN3
to AN3
0
7
0
)
2
A/D pin input voltage
sampling
A/D pin conversion
2

Advertisement

Table of Contents
loading

Table of Contents