English
Language : 

W79E825A Datasheet, PDF (90/127 Pages) Winbond – 8-BIT MICROCONTROLLER
W79E825A/824A/823B/822B Data Sheet
19 ANALOG COMPARATORS
The W79E825 series are provided two Comparators. Input and output options allow use of the
comparators in a number of different Configurations. The Comparator output is a logical one when its
positive input is greater than its negative input, otherwise the output is a zero. Each Comparator can
be configured to cause to an interrupt when the output value change. The block diagram is as below.
Each Comparator has a control register (CMP1 and CMP2), Both Inputs are CINnA, CINnB, CMPREF
and internal reference voltage, and outputs are CMP1 and CMP2 by setting OEn bit. After enable
Comparators the Comparator need waited stable time to guarantee Comparator output. If programmer
used internal reference voltage, it will be set OEn bit to “1”. The value of internal reference voltage
(Vref) is 1.19V +/- 10%.
(P0.4) CIN1A
(P0.3) CIN1B
(P0.5) CMPREF
Enable CMP1
Vref
CE1
CE2
En Vref
Enable CMP2
(P0.2) CIN2A
(P0.1) CIN2B
CP1
CMP1 Analog Circuit
Comparator1
+
CO1
-
OE1
CMP1(P0.6)
Change Detect
CN1
CMF1
CP2 CMP2 Analog Circuit
Comparator2
Interrupt
+
CO2
-
OE2
CMP2(P0.0)
Change Detect
CN2
CMF2
Interrupt
Figure 19-1: Analog Comparators
- 90 -