English
Language : 

M37151 Datasheet, PDF (47/139 Pages) Renesas Technology Corp – SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER and ON-SCREEN DISPLAY CONTROLLER
MITSUBISHI MICROCOMPUTERS
M37151M6/M8/MA/MC/MF-XXXFP, M37151EFFP
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
and ON-SCREEN DISPLAY CONTROLLER
8.8 A-D COMPARATOR
The A-D comparator consists of a 7-bit D-A converter and a com-
parator. The 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 6 of
A-D control register 2 (address 00ED16).
The comparison result of the analog input voltage and the reference
voltage “Vref” is stored in bit 4 of A-D control register 1 (address
00EC16).
For A-D comparison, set “0” to corresponding bits of the direction
register to use ports as analog input pins. Write the data to select
analog input pins for bits 0 to 2 of A-D control register 1 and write the
digital value corresponding to Vref to be compared to bits 0
to 4 of A-D control register 2. The voltage comparison is started by
writing to A-D control register 2, and it is completed after 16 machine
cycles (NOP instruction ✕ 8).
Data bus
A-D control register 1
Bits 0 to 2
AD1
AD2
Analog
AD3
AD4
signal
AD5
switch
AD6
AD7
AD8
Comparator control
Compa-
rator
A-D control
register 1
Bit 4
Bit 6
Bit 5
Bit 4
A-D control
register 2
Bit 3
Bit 2
Bit 1
Bit 0
Switch tree
Resistor ladder
Fig. 8.8.1 A-D Comparator Block Diagram
Rev. 1.0
46