NEC PD78P214 Manuale Utente

Pagina di 487
234
µ
PD78214 Sub-Series
2. If the ADM register is set after registers related to interrupts have been set during the scan mode, an unwanted interrupt may
occur, thus causing the storage location of the conversion result to appear to have shifted.  To prevent this, take the actions
listed below in the stated order.
• Write to the ADM register.
• Reset the interrupt request flag (PIF5) to 0.
• Set the interrupt mask flag or interrupt service mode flag.
8.3.4  A/D Conversion Activated by Software Start
Software can start A/D conversion by writing such a value to the ADM register that the TRG bit is reset to 0 and
the CS bit is set to 1.
If such a value is written to the ADM register again during A/D conversion (the CS bit is 1) that the TRG is reset to
0 and the CS bit is set to 1, the ongoing A/D conversion sequence is stopped, and another A/D conversion sequence
(that matches the newly written value) is started immediately.
Once A/D conversion is started, the conversion sequence of the new data is started according to the mode of
operation specified in the ADM register immediately when the conversion sequence of the previous data is
completed.  A/D conversion continues until a write instruction is executed for the ADM register.
If A/D conversion is started by software (the TRG bit is 0), an input to the INTP5 (pin P26) does not affect the
conversion.
(1) Select-mode A/D conversion
In the select mode, the analog signal, input to the pin selected by the ADM register, is converted to digital form.
When conversion is completed, the analog signal at the same pin is converted again.  An interrupt request
(INTAD) does not occur when conversion is completed.
Fig. 8-8  Software-Started Select-Mode A/D Conversion
Conversion starts
CS
←1, TRG←0
ANn
ANn
ANn
ANm
ADM rewriting
CS
←1, TRG←0
ANm
ANm
ANm
ANm
ANn
ANn
ADCR
A/D conversion
Remark n = 0, 1, ..., 7
m = 0, 1, ..., 7