Fujitsu MB89140 Series Hardware Manual page 100

Table of Contents

Advertisement

A/D CONVERTER
HARDWARE CONFIGURATION
When A/D mode
In the A/D mode, the result of the A/D conversion is stored as soon as con-
version is terminated. After the completion of conversion, the value of the
register is held until conversion is restarted.
As soon as conversion is started, the value of the register becomes unde-
fined. Therefore, the conversion value must always be read after the end of
conversion before the next conversion is started.
When Sense mode
In the Sense mode, the set value to be compared is written beforehand to
this register.
The value of the register, once set, is held unchanged even after compari-
son.
Do not write data during conversion in either the A/D or sense modes.
Description of Operation
The operation of the AD converter is described below.
(1) A/D mode
Start/restart by software
Writing 0 at the ADMD bit (bit 2) of the ADC2 gives the A/D mode. Writing 1
at the AD (bit 0) of the ADC1 starts the A/D conversion.
When 1 is written at the AD bit (bit 0) of the ADC1 during conversion, the
conversion being executed is aborted to restart the next conversion.
Start/restart by external clock pulse
Writing 1 at the EXT bit (bit 1) of the ADC2 in the A/D mode gives the stand-
by state for starting by an external clock pulse. When the rising edge of the
clock pulse selected by the ADCK bit (bit 4) of the ADC2 is detected, the
conversion is started.
When the clock pulse is given at the rising edge during conversion, the
conversion being executed is aborted to restart the conversion. If the con-
version is started or restarted by the external clock pulse with the EXT bit
(bit 1) of the ADC2 set to 1, it cannot be started or restarted by software.
End
After completion of conversion, the results are stored in the data register
and the ADI bit (bit 3) of the ADC1 is set. At this time, if the ADIE bit (bit 2) of
the ADC2 is 1, an interrupt request occurs.
The results of conversion are held in the data register until the next conver-
sion is started. Therefore, the conversion value should be read after con-
version before the next conversion is started. As soon as the conversion is
started, the previous conversion results are lost.
2-80

Advertisement

Table of Contents
loading

Table of Contents