Operations; Initialization; Conversion Start Trigger Source - Epson S1C31D50 Technical Manual

Cmos 32-bit single chip
Hide thumbs Also See for S1C31D50:
Table of Contents

Advertisement

For the R
and C
ADIN
ADIN
"Electrical Characteristics" chapter. Based on these values, configure the ADC12A operating clock CLK_T16_k
and the ADC12A_nTRG.SMPCLK[2:0] bits that set the sampling time so that these settings will satisfy the equa-
tions shown below.
= 8 × (R
t
+ R
ACQ
S
ADIN
1
———— × SMPCLK > t
f
CLK_ADC
Where
f
: CLK_T16_k frequency [Hz]
CLK_ADC
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] = ———————

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" chapter.)
2. Configure the 16-bit timer Ch.k operating clock so that it will satisfy the sampling time.
3. Set the ADC12A_nCTL.MODEN bit to 1.
4. Configure the following ADC12A_nTRG register bits:
- ADC12A_nTRG.SMPCLK[2:0] bits
- ADC12A_nTRG.CNVTRG[1:0] bits
- ADC12A_nTRG.CNVMD bit
- ADC12A_nTRG.STMD bit
- ADC12A_nTRG.STAAIN[2:0] bits
- ADC12A_nTRG.ENDAIN[2:0] bits
5. Set the ADC12A_nCFG.VRANGE[1:0] bits.
6. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the ADC12A_nINTF register.
- Set the interrupt enable bits in the ADC12A_nINTE 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_nDMAEN register.

19.4.2 Conversion Start Trigger Source

The trigger source, which starts A/D conversion, can be selected from the three types shown below using the AD-
C12A_nTRG.CNVTRG[1:0] bits.
External trigger (#ADTRGn pin)
Writing 1 to the ADC12A_nCTL.ADST bit enables the ADC12A to accept trigger inputs. After that, the falling
edge of the signal input to the #ADTRGn pin starts A/D conversion.
16-bit timer Ch.k underflow trigger
Writing 1 to the ADC12A_nCTL.ADST bit enables the ADC12A to accept trigger inputs. After that, A/D con-
version is started when an underflow occurs in the 16-bit timer Ch.k.
Software trigger
Writing 1 to the ADC12A_nCTL.ADST bit starts A/D conversion.
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
values in the equivalent circuit, refer to "12-bit A/D Converter Characteristics" in the
) × C
ADIN
ACQ
f
CLK_ADC
SMPCLK + 13
Seiko Epson Corporation
19 12-BIT A/D CONVERTER (ADC12A)
(Eq. 19.1)
(Eq. 19.2)
(Eq. 19.3)
(Enable ADC12A operations)
(Set sampling time)
(Select conversion start trigger source)
(Set conversion mode)
(Set data storing mode)
(Set analog input pin to be A/D converted first)
(Set analog input pin to be A/D converted last)
(Set operating voltage range according to V
(Clear interrupt flags)
(Enable DMA transfer requests)
)
DD
19-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c31d51

Table of Contents