67
M37905M4C-XXXFP, M37905M4C-XXXSP
M37905M6C-XXXFP, M37905M6C-XXXSP
M37905M8C-XXXFP, M37905M8C-XXXSP
PRELIMINAR
Y
Notice:
This
is not
a final
specification.
Some
parametric
limits
are
subject
to change.
16-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
Figure 74 shows the bit configuration of the comparator function se-
lect register 0 (address DC16), and Figure 75 shows that of the com-
parator function select register 1 (address DD16). Each of bits 7 to 0
corresponds to its own channel, respectively. Each channel can be
selected as either an A-D converter or a comparator. When the bit is
“0”, the channel corresponding to it functions as a 10-bit or an 8-bit
A-D converter. When the bit is “1”, the channel functions as a com-
parator.
When selecting an A-D converter, an input voltage to a selected ana-
log input pin is A-D converted and the result is stored into one of
these A-D registers.
When selecting a comparator, D-A conversion is performed to the
value of which high-order 8 bits are the value stored in an even ad-
dress of the A-D converter and of which low-order 2 bits are “102.”
Then, this D-A converted value is compared with the voltage sup-
plied to an analog input pin. After the comparison, when the voltage
supplied to an analog input pin is higher, “1” is stored into the com-
parator result register 0 (address DE16) shown in Figure 76, or the
comparator result register 1 (Address DF16) shown in Figure 77.
When it is lower, “0” is stored into that of these register.
Be sure to perform only read to the A-D register of which channel is
selected as an A-D converter, and perform only write to the A-D reg-
ister of which channel is selected as a comparator. Additionally, do
not write to the comparator function select registers 0, 1 and the A-D
register while an A-D converter or a comparator is operating.
Port direction register’s bits corresponding to pins to be A-D con-
verted must be “0” (input mode) because analog input ports are mul-
tiplexed with ports P7 and P8.
Figure 78 shows the bit configuration of the A-D control register 0
(address 1E16), Figure 79 shows that of the A-D control register 1
(address 1F16), and Figure 80 shows that of the A-D control register
2 (address DB16).
The operation clock of the A-D converter,
φAD, is selected by the fol-
lowing bits: bit 7 of the A-D control register 0 and bit 4 of the A-D con-
trol register 1.
When bit 4 of the A-D control register 1 = “0”,
φAD is selected as fol-
lows:
if bit 7 of the A-D control register 0 = “0”,
φAD = f2/4.
if bit 7 of the A-D control register 0 = “1”,
φAD = f2/2.
When bit 4 of the A-D control register 1 = “1”,
φAD is selected as fol-
lows:
if bit 7 of the A-D control register 0 = “0”,
φAD = f2.
if bit 7 of the A-D control register 0 = “1”,
φAD = f1.
Note that the highest frequency,
φAD = f1, can be selected only in the
8-bit resolution mode.
φAD during A-D conversion must be 250 kHz or more because the
comparator uses a capacity coupling amplifier.
Bit 3 of A-D control register 1 is used to select whether to regard the
conversion result as 10-bit or as 8-bit data. The conversion result is
regarded as 10-bit data when bit 3 is “1” and as 8-bit data when bit 3
is “0”.
When the conversion result is used as 10-bit data, the low-order 8
bits of the conversion result are stored in the even address of the
corresponding A-D register and the high-order 2 bits are stored in
bits 0 and 1 at the odd address of the corresponding A-D register.
Bits 2 to 7 of the A-D register odd address are “0000002” when read.
When the conversion result is used as 8-bit data, the high-order 8
bits of the 10-bit A-D conversion result are stored in even address of
the corresponding A-D register. In this case, the value at the A-D
register’s odd address is “0016” when read.
Whether to connect the reference voltage input (VREF) with the lad-
der network or not depends on bit 5 of the A-D control register 1. The
VREF pin is connected when bit 5 is “0” and is disconnected when bit
5 is “1” (High impedance state).
When A-D or D-A conversion is not performed, current from the VREF
pin to the ladder network can be cut off by disconnecting ladder net-
work from the VREF pin.
Before starting A-D conversion, wait for 1
s or more after clearing
bit 5 to “0”.