![](http://datasheet.mmic.net.cn/90000/M37920F8CHP_datasheet_3496268/M37920F8CHP_70.png)
M37920F8CGP, M37920F8CHP, M37920FCCGP
M37920FCCHP, M37920FGCGP, M37920FGCHP
PRELIMINAR
Y
Notice:
This
is not
a final
specification.
Some
parametric
limits
are
subject
to change.
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER FLASH MEMORY VERSION
MITSUBISHI MICROCOMPUTERS
70
Operation mode
The operation mode is selected by bits 3 and 4 of A-D control regis-
ter 0. The available operation modes are one-shot, repeat, single
sweep, and repeat sweep. Analog input port pins are multiplexed
with port P7 pins. Therefore, bits which correspond to pins for A-D
conversion must be “0” (input mode).
(1) One-shot mode
One-shot mode is selected when bits 3 and 4 of A-D control register
0 are “0” is “0”. The A-D conversion pins are selected with bits 0 and
1 of A-D control register 0.
When a software trigger is selected, A-D conversion is started when
bit 6 (A-D conversion start bit) is set to “1”.
When bit 3 of the A-D control register 1 is “1”, A-D conversion ends
after 59
fAD cycles, and the interrupt request bit of the A-D interrupt
control register is set to “1”. At the same time, bit 6 of A-D control reg-
ister 0 (A-D conversion start bit) is cleared to “0” and A-D conversion
stops. The result of A-D conversion is stored in the A-D register cor-
responding to the selected pin.
If an external trigger is selected, A-D conversion starts when the A-D
conversion start bit is “1” and a valid edge is input to the ADTRG pin,
This operation is the same as that for software trigger except that
the A-D conversion start bit is not cleared after A-D conversion and
a retrigger can be available during A-D conversion.
(2) Repeat mode
Repeat mode is selected when bit 3 of A-D control register 0 is “1”
and bit 4 is “0”.
The operation of this mode is the same as the operation of one-shot
mode except that when A-D conversion of the selected pin is com-
plete and the result is stored in the A-D register, conversion does not
stop, but is repeated.
No interrupt request is generated in this mode. Furthermore, if a soft-
ware trigger is selected, the A-D conversion start bit is not cleared.
The contents of the A-D register can be read at any time.
(3) Single sweep mode
Single sweep mode is selected when bit 3 of A-D control register 0 is
“0” and bit 4 is “1”.
In the single sweep mode, the number of analog input pins to be
swept can be selected. Analog input pin is selected by bit 0 of the A-
D control register 1 (address 1F16). Two pins, or four pins can be se-
lected as analog input pins, depending on the contents of these bits.
A-D conversion is performed only for selected input pins. After A-D
conversion is performed for input of AN0 pin, the conversion result is
stored in A-D register 0, and in the same way, A-D conversion is per-
formed for selected pins one after another. After A-D conversion is
performed for all selected pins, the sweep is stopped.
A-D conversion can be started with a software trigger or with an ex-
ternal trigger input. A software trigger is selected when bit 5 of the A-
D control register 0 (address 1E16) is “0” and an external trigger is
selected when it is “1”.
When a software trigger is selected, A-D conversion is started when
bit 6 of A-D control register 0 (A-D conversion start bit) is set to “1”.
When A-D conversion of all selected pins end, the interrupt request
bit of the A-D conversion interrupt control register is set to “1”. At the
same time, A-D conversion start bit is cleared to “0” and A-D conver-
sion stops.
When an external trigger is selected, A-D conversion starts when the
A-D conversion start bit is “1” and a valid edge is input to the ADTRG
pin. In this case, the A-D conversion result which is stored in the A-D
register 3 becomes invalid.
The operation by external trigger is the same as that by a software
trigger except that the A-D conversion start bit is not cleared to “0”
after A-D conversion and that a retrigger can be available during A-D
conversion.
(4) Repeat sweep mode
Repeat sweep mode is selected when bit 3 of A-D control register 0
is “1” and bit 4 is “1”.
The difference from the single sweep mode is that A-D conversion
does not stop after conversion for all selected pins, but repeats again
from the AN0 pin. The repeat is performed among the selected pins.
Also, no interrupt request is generated. Furthermore, if a software
trigger is selected, the A-D convension start bit is not cleared. The
A-D register can be read at any time.
Precautions for A-D conversion interrupt
function
Clear the interrupt request bit of the A-D interrupt control register (bit
3 at address 7016) before using an A-D interrupt. It is because this
interrupt request bit is undefined just after reset.