13-3
MSM66573 Family User's Manual
Chapter 13 A/D Converter Functions
13
13.3.1 Description of A/D Converter Registers
(1)
A/D control register 0L (ADCON0L)
A/D control register 0L (ADCON0L) consists of 6 bits and specifies settings for the scan
mode.
ADCON0L can be read from and written to by the program. However, write operations are
invalid for bit 7. Also, if bit 3 is to be written to, a value of "0" must be written. If read, bit
3 is always "0" and bit 7 is always "1".
When reset (
RES signal input, execution of a BRK instruction, overflow of the watchdog
timer, opcode trap), ADCON0L becomes 80H.
Figure 13-2 shows the ADCON0L configuration.
[Description of each bit]
ADSNM00 to ADSNM02 (bits 0 to 2)
ADSNM00 to ADSNM02 specify the scan channels of the scan mode.
Change the scan channels while the A/D converter is halted.
Changes of the scan channels are valid only when ADRUN0 (bit 4) is "0".
ADRUN0 (bit 4)
ADRUN0 starts and stops A/D conversion in the scan mode.
If set to "1", A/D conversion will begin. If reset to "0", conversion will be stopped. The
ADRUN0 bit specifies to operate or to halt A/D conversion and is not a status flag
indicating whether conversion is in progress or is halted.
SNEX0 (bit 5)
SNEX0 specifies the factor that activates A/D conversion in the scan mode.
When SNEX0 is "0", after A/D conversion of the previous channel is complete, conversion
of the next channel begins. When SNEX0 is "1", after A/D conversion of the previous
channel is complete, 1 channel of A/D conversion is performed for each valid edge of the
signal at the external interrupt input pin (EXINT1).
SCNC0 (bit 6)
SCNC0 specifies the operating mode after one cycle of scanning.
When SCNC0 is "0", after one cycle of the specified scanning channels, A/D conversion
starts again at the first channel.
When SCNC0 is "1", after one cycle of the specified scanning channels, A/D conversion
is stopped.
If used in the "SCNC0 = 1" mode, A/D conversion is reactivated by resetting to "0" the
INTSN0 flag that is located in ADINT0 and indicates when one cycle of scanning is
complete. (Control with the ADRUN0 bit is unnecessary. With ADRUN0 set to "1", A/D
conversion can be activated by resetting INTSN0 to "0".)
If the mode is to be switched to "SCNC0 = 0" (the "after one cycle, start the next
conversion" mode), reactivate the A/D conversion by resetting SCNC0 to "0". (Control
with the ADRUN0 bit is unnecessary.)
[Note]
If used in the "after one cycle of scanning, stop the conversion" mode, A/D conversion can
not be reactivated by resetting to "0” and then setting to "1" the ADRUN0 bit.