Rev. 1.00
88
August 29, 2018
Rev. 1.00
89
August 29, 2018
HT45F6530
AC Voltage Regulator Flash MCU
HT45F6530
AC Voltage Regulator Flash MCU
Comparator Input Offset Calibration
Step 1. Set CnOFM=1 and CnRSP=1, the OCP Comparator n will now operate in the comparator
input offset calibration mode, S3 and S5 on. To make sure V
OS
as minimize as possible
after calibration, the input reference voltage in calibration should be the same as input DC
operating voltage in normal operation.
Step 2. Set CnOF[4:0]=00000 and read the CMPnO bit.
Step 3. Increase the CnOF[4:0] value by 1 and then read the CMPnO bit.
If the CMPnO bit state has not changed, then repeat Step 3 until the CMPnO bit state has
changed.
If the CMPnO bit state has changed, record the CnOF[4:0] value as V
OS1
and then go to Step 4.
Step 4. Set CnOF[4:0]=11111 and then read the CMPnO bit.
Step 5. Decrease the CnOF[4:0] value by 1 and then read the CMPnO bit.
If the CMPnO bit state has not changed, then repeat Step 5 until the CMPnO bit state has
changed.
If the CMPnO bit state has changed, record the CnOF[4:0] value as V
OS2
and then go to Step 6.
Step 6. Restore the OCP Comparator n input offset calibration value V
OS
into the CnOF[4:0] bit
field. The offset Calibration procedure is now finished.
Where V
OS
=(V
OS1
+V
OS2
)/2. If (V
OS1
+V
OS2
)/2 is not integral, discard the decimal.
Residue V
OS
=V
OUT
– V
IN
Low Voltage Detector – LVD
The device has a Low Voltage Detector function, also known as LVD. This enabled the device to
monitor the power supply voltage, V
DD
, and provide a warning signal should it fall below a certain
level. This function may be especially useful in battery applications where the supply voltage will
gradually reduce as the battery ages, as it allows an early warning battery low signal to be generated.
The Low Voltage Detector also has the capability of generating an interrupt signal.
LVD Register
The Low Voltage Detector function is controlled using a single register with the name LVDC. Three
bits in this register, VLVD2~VLVD0, are used to select one of eight fixed voltages below which
a low voltage condition will be determined. A low voltage condition is indicated when the LVDO
bit is set. If the LVDO bit is low, this indicates that the V
DD
voltage is above the preset low voltage
value. The LVDEN bit is used to control the overall on/off function of the low voltage detector.
Setting the bit high will enable the low voltage detector. Clearing the bit to zero will switch off the
internal low voltage detector circuits. As the low voltage detector will consume a certain amount of
power, it may be desirable to switch off the circuit when not in use, an important consideration in
power sensitive battery powered applications.
• LVDC Register
Bit
7
6
5
4
3
2
1
0
Name
—
—
LVDO
LVDEN
VBGEN
VLVD2
VLVD1
VLVD0
R/W
—
—
R
R/W
R/W
R/W
R/W
R/W
POR
—
—
0
0
0
0
0
0
Bit 7~6
Unimplemented, read as “0”