Register Setting - Toshiba TLCS-870/C Series Manual

8 bit microcontroller
Hide thumbs Also See for TLCS-870/C Series:
Table of Contents

Advertisement

13. 10-bit AD Converter (ADC)
13.3 Function
ADCCR1<AMD>
ADCCR1<ADRS>
Conversion operation
ADCDR1,ADCDR2
ADCDR2<EOCF>
INTADC interrupt request
ADCDR1
ADCDR2

13.3.3 Register Setting

AD conversion start
1st conversion
2nd conversion result
result
Indeterminate
1st conversion result
Figure 13-3 Repeat Mode
1. Set up the AD converter control register 1 (ADCCR1) as follows:
• Choose the channel to AD convert using AD input channel select (SAIN).
• Specify analog input enable for analog input control (AINDS).
• Specify AMD for the AD converter control operation mode (software or repeat mode).
2. Set up the AD converter control register 2 (ADCCR2) as follows:
• Set the AD conversion time using AD conversion time (ACK). For details on how to set the con-
version time, refer to Figure 13-1 and AD converter control register 2.
• Choose IREFON for DA converter control.
3. After setting up (1) and (2) above, set AD conversion start (ADRS) of AD converter control register 1
(ADCCR1) to "1". If software start mode has been selected, AD conversion starts immediately.
4. After an elapse of the specified AD conversion time, the AD converted value is stored in AD con-
verted value register 1 (ADCDR1) and the AD conversion finished flag (EOCF) of AD converted
value register 2 (ADCDR2) is set to "1", upon which time AD conversion interrupt INTADC is gener-
ated.
5. EOCF is cleared to "0" by a read of the conversion result. However, if reconverted before a register
read, although EOCF is cleared the previous conversion result is retained until the next conversion is
completed.
"11"
3rd conversion result
2nd conversion result
Conversion
Conversion
result read
result read
Conversion
Conversion
result read
result read
Page 146
TMP86PM29BUG
"00"
AD convert operation suspended.
Conversion result is not stored.
3rd conversion result
EOCF cleared by reading
conversion result
Conversion
result read
Conversion
result read

Advertisement

Table of Contents
loading

Table of Contents