IV ANALOG BLOCK: A/D CONVERTER
B-IV-2-6
EPSON
S1C33210 FUNCTION PART
When a trigger is input, the A/D converter samples and A/D-converts the analog input signal, beginning with
the conversion start channel selected by CS[2:0].
Upon completion of the A/D conversion in that channel, the A/D converter stores the conversion result, in 10-
bit data registers ADD[9:0] (ADD[9:8] = D[1:0]/0x40241, ADD[7:0] = D[7:0]/0x40240), and sets the
conversion-complete flag ADF (D3) / A/D enable register (0x40244) and interrupt factor flag FADE (D0) / Port
input 4–7, clock timer and A/D interrupt factor flag register (0x40287). If multiple channels are specified using
CS[2:0] and CE[2:0], A/D conversions in the subsequent channels are performed in succession.
The ADST used for the software trigger is set to "1" during A/D conversion, even when it is started by some
other trigger, so it can be used as an A/D-conversion status bit.
The channel in which conversion is underway can be identified by reading CH[2:0] (D[2:0]) / A/D trigger
register (0x40242).
Reading out A/D conversion results
As explained earlier, the results of A/D conversion are stored in the ADD[9:0] register each time conversion in
one channel is completed. Since an interrupt can be generated simultaneously, this interrupt is normally used to
read out the converted data. In addition, be sure to reset the interrupt factor flag (by writing "0") to prepare the
A/D converter for the next operation.
Since the interrupt factor of the A/D converter can also be used to invoke DMA, the conversion results can
automatically be transferred to a specified memory location.
If multiple A/D conversion channels are specified, the conversion results in one channel must be read out prior
to completion of conversion in the next channel. If the A/D conversion currently under way is completed before
the previous conversion results are read out, the ADD[9:0] register is overwritten with the new conversion
results.
If ADD[9:0] is updated when the conversion-complete flag ADF = "1" (before the converted data is read out),
the overwrite-error flag OWE (D0) / A/D enable register (0x40244) is set to "1". The conversion-complete flag
ADF is reset to "0" when the converted data is read out. If ADD[9:0] is updated when ADF = "0", OWE
remains at "0", indicating that the operation has been completed normally. When reading out data, also read the
OWE flag also to make sure the data is valid. Once OWE is set, it remains set until it is reset to "0" in the
software. Note also that if OWE is set, ADF also is set. In this case, read out the converted data and reset ADF.
Terminating A/D conversion
• For normal mode (MS = "1")
In the normal mode, A/D conversion is performed successively from the conversion start channel specified
using CS[2:0] to the conversion end channel specified using CE[2:0], and is completed after these conversions
are executed in one operation. ADST is reset to "0" upon completion of the conversion.
• For continuous mode (MS = "0")
In the continuous mode, A/D conversion from the conversion-start to the conversion-end channels is executed
repeatedly, without being stopped in the hardware. To terminate conversion, therefore, ADST must be reset to
"0" in the software. However, the conversion will normally complete or forcibly stopped depends on timing of
writing "0" to ADST.
When conversion is completed normally, ADF is set to "1" and conversion result is obtained. On the other
hand, when it is forcibly stopped, ADF register keep the previous value and a conversion result is not obtained.
• Forced termination
A/D conversion can only be stopped by writing "0" to ADST in continuous mode. At this time it is not possible
to acquire the value of the conversion that was in progress.
A/D conversion cannot be stopped by writing "0" to ADST in normal mode.
Note that A/D conversion cannot be stopped by writing "0" to ADE during a conversion (when ADST is "1").
Note: Once A/D conversion ends, further A/D conversion will not be performed correctly if restarted within
an interval shorter than one cycle of the A/D converter operating clock set by the prescaler.
Summary of Contents for S1C33210
Page 4: ......
Page 13: ...S1C33210 PRODUCT PART ...
Page 14: ......
Page 124: ...APPENDIX B PIN CHARACTERISTICS A 110 EPSON S1C33210 PRODUCT PART THIS PAGE IS BLANK ...
Page 125: ...S1C33210 FUNCTION PART ...
Page 126: ......
Page 127: ...S1C33210 FUNCTION PART I OUTLINE ...
Page 128: ......
Page 130: ...I OUTLINE INTRODUCTION B I 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 138: ...I OUTLINE LIST OF PINS B I 3 6 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 139: ...S1C33210 FUNCTION PART II CORE BLOCK ...
Page 140: ......
Page 142: ...II CORE BLOCK INTRODUCTION B II 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 148: ...II CORE BLOCK CPU AND OPERATING MODE B II 2 6 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 152: ...II CORE BLOCK INITIAL RESET B II 3 4 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 234: ...II CORE BLOCK CLG Clock Generator B II 6 10 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 236: ...II CORE BLOCK DBG Debug Unit B II 7 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 237: ...S1C33210 FUNCTION PART III PERIPHERAL BLOCK ...
Page 238: ......
Page 240: ...III PERIPHERAL BLOCK INTRODUCTION B III 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 296: ...III PERIPHERAL BLOCK WATCHDOG TIMER B III 5 4 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 429: ...S1C33210 FUNCTION PART IV ANALOG BLOCK ...
Page 430: ......
Page 432: ...IV ANALOG BLOCK INTRODUCTION B IV 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 448: ...IV ANALOG BLOCK A D CONVERTER B IV 2 16 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 449: ...S1C33210 FUNCTION PART V DMA BLOCK ...
Page 450: ......
Page 452: ...V DMA BLOCK INTRODUCTION B V 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 506: ...V DMA BLOCK IDMA Intelligent DMA B V 3 18 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 507: ...S1C33210 FUNCTION PART Appendix I O MAP ...
Page 508: ......
Page 557: ......