Comparator Registers - Holtek HT66F20 Manual

A/d flash mcu with eeprom
Table of Contents

Advertisement

Comparator Registers

There are two registers for overall comparator operation, one for each comparator. As corresponding
bits in the two registers have identical functions, they following register table applies to both
registers.
Register
Name
7
CP0C
C0SEL
CP�C
C�SEL
CP0C Registe
Bit
7
Name
C0SEL
R/W
R/W
POR
Bit 7
C0SEL: Select Comparator pins or I/O pins
0: I/O pin select
1: Comparator pin select
This is the Comparator pin or I/O pin select bit. If the bit is high the comparator will
be selected and the two comparator input pins will be enabled. As a result, these two
pins will lose their I/O pin functions. Any pull-high configuration options associated
with the comparator shared pins will also be automatically disconnected.
Bit 6
C0EN: Comparator On/Off control
0: Off
1: On
This is the Comparator on/off control bit. If the bit is zero the comparator will be
switched off and no power consumed even if analog voltages are applied to its inputs.
For power sensitive applications this bit should be cleared to zero if the comparator is
not used or before the device enters the SLEEP or IDLE mode.
C0POL: Comparator output polarity
Bit 5
0: Output not inverted
1: Output inverted
This is the comparator polarity bit. If the bit is zero then the C0OUT bit will reflect
the non-inverted output condition of the comparator. If the bit is high the comparator
C0OUT bit will be inverted.
Bit 4
C0OUT: Comparator output bit
C0POL=0
0: C0+ < C0-
1: C0+ > C0-
C0POL=1
0: C0+ > C0-
1: C0+ < C0-
This bit stores the comparator output bit. The polarity of the bit is determined by the
voltages on the comparator inputs and by the condition of the C0POL bit.
Rev. 2.50
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Bit
6
5
4
C0EN
C0POL
C0OUT
C�EN
C�POL
C�OUT
Comparator Registers List
6
5
4
C0EN
C0POL
C0OUT
R/W
R/W
R
0
0
0
�82
3
2
1
C0OS
C�OS
3
2
1
C0OS
R/W
0
��ne 22� 20��
0
C0HYEN
C�HYEN
0
C0HYEN
R/W

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT66F20 and is the answer not in the manual?

Table of Contents