Rev. 1.00
86
August 29, 2018
Rev. 1.00
87
August 29, 2018
HT45F6530
AC Voltage Regulator Flash MCU
HT45F6530
AC Voltage Regulator Flash MCU
This bit is used to select the OCP Comparator n operating mode. If the bit is zero
the OCP Comparator n will operate normally. The OCP Comparator n will enter the
offset calibration mode if this bit is set high. Refer to the “Comparator Input Offset
Calibration” section for the detailed offset calibration procedures.
Bit 5
CnRSP
: OCP Comparator n input offset calibration reference selection
0: From CMPnN pin
1: From CMPnP pin
This bit is used to select the OCP Comparator n input offset calibration reference.
When the OCP Comparator n is in the offset calibration mode, the calibration reference
input can come from the OCP Comparator n inputs, CMPnN or CMPnP, determined
by this bit. This bit is only available when the OCP Comparator n operates in offset
calibration mode.
Bit 4~0
CnOF4~CnOF0
: OCP Comparator n input offset calibration control bits
These bits are used to calibrate the input offset according to the selected reference
input when the OCP Comparator n is in the offset calibration mode. More detailed
information is described in the “Comparator Input Offset Calibration” section.
Offset Calibration Procedure
To operate in the input offset calibration mode for the OCP Operational Amplifier n or the OCP
Comparator n, the OnOFM or CnOFM bit should first be set to “1” followed by the reference input
selection by configuring the OnRSP or CnRSP bit. Note that as the OCP Operational Amplifier n or
the OCP Comparator n inputs are pin-shared with I/O pins, they should be configured as the OCP
Operational Amplifier n inputs or the OCP Comparator n inputs first. The following procedures use
the positive input pins as reference input for example.
Operational Amplifier Input Offset Calibration
Step 1. Set OnOFM=1 and OnRSP=1, the OCP Operational Amplifier n will operate in the input
offset calibration mode, S0 and S2 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 OnOF[5:0]=000000 and then read the OPnOUT bit.
Step 3. Increase the OnOF[5:0] value by 1 and then read the OPnOUT bit.
If the OPnOUT bit state has not changed, then repeat Step 3 until the OPnOUT bit state has
changed.
If the OPnOUT bit state has changed, record the OnOF[5:0] value as V
OS1
and then go to
Step 4.
Step 4. Set OnOF[5:0]=111111 and read the OPnOUT bit.
Step 5. Decrease the OnOF[5:0] value by 1 and then read the OPnOUT bit.
If the OPnOUT bit state has not changed, then repeat Step 5 until the OPnOUT bit state has
changed.
If the OPnOUT bit state has changed, record the OnOF[5:0] value as V
OS2
and then go to
Step 6.
Step 6. Restore the OCP Operational Amplifier n input offset calibration value V
OS
into the
OnOF[5: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