
R01UH0336EJ0102 Rev.1.02
Page 1294 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 23 A/D Converter
23.3.10
Result Check Functions
The ADCAn provides the following functions to check the A/D conversion
results:
• Overwrite check for A/D conversion results
• Read flag for A/D conversion results
• Upper/lower limit comparison for A/D conversion results
(1)
Overwrite Check for A/D Conversion Results
The ADCAn can check if an A/D conversion result has been overwritten before
it is read.
Error flags
Each of the A/D conversion result registers provides the overwrite error flag as
follows:
ADCAnLCR.ADCAnLER1
ADCAnDBiCR.ADCAnDBiER1
ADCAnCmCR.ADCAnCmER1
For example, if the A/D conversion result stored in ADCAnCmCR has been
overwritten before it is read, ADCAnCmCR.ADCAnCmER1 is set to 1.
The same applies to ADCAnLCR and ADCAnDBiCR.
The value of ADCAnCmCR.ADCAnCmER1 is also reflected in
ADCAnSTR1.ADCAnOWEm.
Error interrupt
The error interrupt INTADCAnTERR is generated if an A/D conversion result in
ADCAnLCR, ADCAnDBiCR, or ADCAnCmCR is overwritten before it is read.
For the conversion result register that the stored conversion result is not read
out, an error interrupt should be masked by appropriately setting
ADCAnCTL0.ADCAnOEM[4:0]. (Do not perform the overwrite check for A/D
conversion result.)
Unless an error interrupt is masked, the ADCAn does not detect reading of the
conversion result. In this case, the ADCAn detects that the result is overwritten
at storage of the next A/D conversion result, and the error interrupt
INTADCAnTERR occurs.
(2)
Read Flag for A/D Conversion Results
The ADCAn can check whether an A/D conversion result has already been
read, or not yet been read.
Update
status flag
Each of the A/D conversion result registers provides the update status flag as
follows.
ADCAnLCR.ADCAnLUR
ADCAnDBiCR.ADCAnDBiUR
ADCAnCmCR.ADCAnCmUR
If these flags are set to 1, the updated A/D conversion result has not been read
yet. The update status flag is cleared to 0 after the A/D conversion result is
read.
Содержание V850 Series
Страница 1556: ...V850E2 PG4 L R01UH0336EJ0102 Back Cover ...