MITSUBISHI MICROCOMPUTERS
M37207MF-XXXSP/FP, M37207M8-XXXSP
M37207EFSP/FP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER
and ON-SCREEN DISPLAY CONTROLLER
44
A-D COMPARATOR
A-D comparator consists of 6-bit D-A converter and comparator. A-D
comparator block diagram is shown in Figure 40.
The reference voltage “Vref” for D-A conversion is set by bits 0 to 5 of
the A-D control register 2 (address 020A16).
The comparison result of the analog input voltage and the reference
voltage “Vref” is stored in bit 4 of the A-D control register 1 (address
00EF16).
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 A-D control register 2. The voltage comparison starts by writing to
the A-D control register 2, and it is completed after 16 machine cycles
(NOP instruction ✕ 8).
Fig. 40. A-D Comparator Block Diagram
A-D control register 1
Bits 0 to 2
Comparator control
Data bus
Bit 4
Switch tree
A-D control register 2
Resistor ladder
Compa-
rator
Analog
signal
switch
Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
A-D control register 1
AD1
AD2
AD3
AD4
AD5
AD6
AD7
AD8