19-3
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
19.3.2.
Sampling Time
The ADC12A includes a sample and hold circuit. The sampling time must be set so that it will satisfy the
time required for acquiring input voltage (t
ACQ
: acquisition time). Figure 19.3.2.1 shows an equivalent
circuit of the analog input portion.
Figure 19.3.2.1 Equivalent Circuit of Analog Input Portion
For the R
ADIN
and C
ADIN
values in the equivalent circuit, refer to
“12
-bit A/D Converter
Characteristics”
in
the “Electrical
Characteristics”
chapter. Based on these values, configure the ADC12A operating
clock CLK_T16_
k
and the ADC12A_
n
TRG.SMPCLK[2:0] bits that set the sampling time so that these
settings will satisfy the equations shown below.
tACQ = 8 × (RS + RADIN) × CADIN (𝐸𝑞. 19.1)
1
𝑓
𝐶𝐿𝐾_ADC
× SMPCLK > 𝑡
𝐴𝐶𝑄
(𝐸𝑞. 19.2)
Where
fCLK_ADC: CLK_T16_k frequency [Hz]
SMPCLK: Sampling time = ADC12A_nTRG.SMPCLK[2:0] bit-setting (4 to 11 CLK_T16_k cycles)
The following shows the relationship between the sampling time and the maximum sampling rate.
Maximum sampling rate [sps] =
𝑓
𝐶𝐿𝐾
ADC
SMPCLK + 13
(𝐸𝑞. 19.3)
19.4.
Operations
19.4.1.
Initialization
The ADC12A should be initialized with the procedure shown below.
1.
Assign the ADC12A input function to the ports.
(Refer to the “I/O Ports” chapte
r.)
2.
Configure the 16-bit timer Ch.
k
operating clock so that it will satisfy the sampling time.
3.
Set the ADC12A_
n
CTL.MODEN bit to 1.
(Enable ADC12A operations)
4.
Configure the following ADC12A_
n
TRG register bits:
-
ADC12A_
n
TRG.SMPCLK[2:0] bits
(Set sampling time)
-
ADC12A_
n
TRG.CNVTRG[1:0] bits
(Select conversion start trigger source)
-
ADC12A_
n
TRG.CNVMD bit
(Set conversion mode)
-
ADC12A_
n
TRG.STMD bit
(Set data storing mode)
-
ADC12A_
n
TRG.STAAIN[2:0] bits
(Set analog input pin to be A/D converted first)
-
ADC12A_
n
TRG.ENDAIN[2:0] bits
(Set analog input pin to be A/D converted last)
5.
Set the ADC12A_
n
CFG.VRANGE[1:0] bits.
(Set operating voltage range according to V
DD
)
6.
Set the following bits when using the interrupt:
-
Write 1 to the interrupt flags in the ADC12A_
n
INTF register.
(Clear interrupt flags)
-
Set the interrupt enable bits in the ADC12A_
n
INTE register to 1. (Enable interrupts)
7.
Configure the DMA controller and set the following ADC12A control bit when using DMA transfer:
-
Write 1 to the DMA transfer request enable bit in the ADC12A_
n
DMAEN register. (Enable DMA
R
S
ADIN
nm
VDD
VSS
VDD
CADIN
VSS
R
S
: Source impedance
RADIN: Analog input resistance
CADIN: Analog input capacitance
Содержание S1C31D50
Страница 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Страница 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Страница 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Страница 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...