Comparators; Comparator Operation; Comparator Registers - Holtek HT68F Series Manual

Enhanced i/o flash type 8-bit mcu with eeprom
Table of Contents

Advertisement

Comparators

Two independent analog comparators are contained within these devices. These functions offer
flexibility via their register controlled features such as power-down, polarity select, hysteresis etc.
In sharing their pins with normal I/O pins the comparators do not waste precious I/O pins if there
functions are otherwise unused.

Comparator Operation

The device contains two comparator functions which are used to compare two analog voltages
and provide an output based on their difference. Full control over the two internal comparators
is provided via two control registers, CP0C and CP1C, one assigned to each comparator. The
comparator output is recorded via a bit in their respective control register, but can also be transferred
out onto a shared I/O pin. Additional comparator functions include, output polarity, hysteresis
functions and power down control.
Any pull-high resistors connected to the shared comparator input pins will be automatically
disconnected when the comparator is enabled. As the comparator inputs approach their switching
level, some spurious output signals may be generated on the comparator output due to the slow
rising or falling nature of the input signals. This can be minimised by selecting the hysteresis
function will apply a small amount of positive feedback to the comparator. Ideally the comparator
should switch at the point where the positive and negative inputs signals are at the same voltage
level, however, unavoidable input offsets introduce some uncertainties here. The hysteresis function,
if enabled, also increases the switching offset value.

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
CP1C
C1SEL
Rev. 2.10
HT68F20/HT68F30/HT68F40/HT68F50/HT68F60
HT68FU30/HT68FU40/HT68FU50/HT68FU60
Enhanced I/O Flash Type 8-Bit MCU with EEPROM
C n P O L
C n +
C n -
Comparator
6
5
4
C0EN
C0POL
C0OUT
C1EN
C1POL
C1OUT
Comparator Registers List
166
C n O U T
C n X
C n S E L
Bit
3
2
1
C0OS
C1OS
0
C0HYEN
C1HYEN
���� 02� 201�

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents