Functional Descriptions. Holtek HT32F5828

Add to My manuals
637 Pages

advertisement

Functional Descriptions. Holtek HT32F5828 | Manualzz

32-Bit Arm ®

HT32F5828

Cortex ® -M0+ MCU

Functional Descriptions

Comparator Inputs and Output

The I/O pins used as comparator input or output must be configured in the AFIO controller registers. The detailed comparator input and output information will be referred in pin assignment table in the datasheet. The output can also be internally connected to a variety of timers or ADC for trigger purpose. The comparator output can simultaneously be used for both internal and external functions.

Comparator Voltage Reference

The comparator voltage reference is a 256-tap resistor ladder network that provides a selectable reference voltage. A block diagram of the comparator voltage reference is shown in Figure 104. It also has a power-down function to conserve power when the reference is not used. The comparator voltage reference provides 256 distinct levels. The equation used to calculate the value of the reference voltage is as follows:

V

CVR

= CVRVAL × (V

RP

- V

SSA

) / 255

The supply voltage V

RP

can come from either the V

DDA

or the internal voltage reference V

REF by configuring the CVRSS bit in the Comparator Control Register CMPCRn. The CVR output

V

CVR

is used to provide a reference voltage for the analog comparator. It can be internally used or configured to connect to the CN pin by setting the CVROE bit in the Comparator Control Register

CMPCRn . The settling time of the comparator voltage reference must be considered when the V

CVR output voltage is changed.

V

DDA

V

REF

CVRSS = 0

CVRSS = 1

V

RP

CVRVAL[7:0]

CVREN

R

R

R

R V

CVR

R

R

R

Figure 104. Comparator Voltage Reference Block Diagram

Rev. 1.00 389 of 637 December 28, 2020

advertisement

Related manuals

advertisement

Table of contents