
49
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER
with ON-SCREEN DISPLAY CONTROLLER
M37212M4/M8–XXXSP, M37212M6–XXXSP/FP
M37212EFSP/FP
MITSUBISHI MICROCOMPUTERS
Rev. 1.0
8.8 A-D COMPARATOR
A-D comparator consists of 6-bit D-A converter and comparator. A-D
comparator block diagram is shown in Figure 8.8.1.
The reference voltage “Vref” for D-A conversion is set by bits 0 to 5 of
the A-D control register (address 00EF16).
The comparison result of the analog input voltage and the reference
voltage “Vref” is stored in bit 4 of the A-D mode register (address
00EE16).
For A-D comparison, set “0” to corresponding bits of the direction
register to use ports as analog input pins. Write the data for select of
analog input pins to bits 0 to 2 of the A-D control register 1 and write
the digital value corresponding to Vref to be compared to the bits 0
to 5 of the A-D control register. The voltage comparison starts by
writing to the A-D control register 2, and it is completed after 16 ma-
chine cycles (NOP instruction ! 8).
Fig. 8.8.1 A-D Comparator Block Diagram
A-D mode register
Bits 0 to 2
Comparator control
Data bus
Bit 4
Switch tree
A-D control
register
Resistor ladder
Compa-
rator
Analog
signal
switch
Bit 5Bit 4Bit 3Bit 2Bit 1
Bit 0
A-D mode
register
A-D1
A-D2
A-D3
A-D4
A-D5
A-D6
A-D7
A-D8