A-D Comparator; Fig. 2.9.1 A-D Comparator Block Diagram - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

2.9 A-D comparator

The M37221M6-XXXSP/FP has A-D comparator consists of the 6-bit D-A converter by resistance string
method and a comparator. Figure 2.9.1 shows the A-D comparator block diagram.
A-D control register 1
Bits 0 to 2
P1
/A-D1/INT3
5
P1
/A-D2
6
Analog
P1
/A-D3
7
signal
P0
/INT2/A-D4
6
switch
P3
/A-D5
0
P3
/A-D6
1

Fig. 2.9.1 A-D comparator block diagram

The following explains A-D comparison method.
Set "0" to corresponding bits of the direction register to use ports as analog input pins.
Select the analog input pin with bits 0 to 2 of A-D control register 1 (address 00EE
Set the comparison voltage "V
00EF
). Table 2.9.1 shows the V
16
A-D comparison starts by writing to A-D control register 2.
This voltage comparison needs for 16 machine cycles (NOP instruction
The comparison result is stored in bit 4 of the A-D control register 1 (address 00EE
When the input voltage value is lower than the comparison voltage value, bit 4 is cleared to "0"; when the
input voltage value is higher than the comparison voltage value, bit 4 is set to "1" (refer to "Figure 2.9.2").
FUNCTIONAL DESCRIPTION
Data bus
Comparator control
Compa-
Bit 4
rator
" for D-A conversion by bits 0 to 5 of A-D control register 2 (address
ref
values corresponding to the set values above.
ref
7220 Group User's Manual
A-D control
register 1
Bit 5
Bit 4
2.9 A-D comparator
A-D control
register 2
Bit 3
Bit 2
Bit 1
Switch tree
Resistor ladder
).
16
8).
).
16
Bit 0
2-61

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents