Rev. 1.00
132
September 11, 2018
Rev. 1.00
133
September 11, 2018
HT45F4050
A/D NFC Flash MCU
HT45F4050
A/D NFC Flash MCU
Bit 4~0
COF4~COF0
: Comparator input offset calibration value
This 5-bit field is used to perform the comparator input offset calibration operation and
the value after the input offset calibration can be restored into this bit field. Refer to
the "Input Offset Calibration" section for more detailed information
.
Input Offset Calibration
To operate in the input offset calibration mode, the comparator input pins to be used should first
be selected by properly configuring the corresponding pin-shared function selection bits followed
by setting the COFM bit high and selecting the reference input by configuring the CRSP bit
.
The
procedure is summarized
as as the following.
Step 1.
Set COFM=1 to enable the
comparator input offset calibration mode and set the CRSP bit to
select the reference input
.
Step 2.
Set COF[4:0]=00000
B
and read the CMPO bit.
Step 3.
Increase the COF[4:0] value by 1 and then read the CMPO bit.
If the CMPO bit state does not change, then repeat Step 3 until the CMPO bit state changes
.
If the CMPO bit state changes, record the COF field value as VOS1 and then go to Step 4.
Step 4.
Set COF[4:0]=11111
B
and read the CMPO bit.
Step 5.
Decrease the COF[4:0] value by 1 and then read the CMPO bit.
If the CMPO bit state does not change, then repeat Step 5 until the CMPO bit state changes
.
If the CMPO bit state changes, record the COF field value as VOS2 and then go to Step 6.
Step 6.
Restore the comparator input offset calibration value
VOS
into the COF [4:0] bit field. The
offset calibration procedure is now finished and the input offset value is calculated by the
following equation.
2
VOS2
VOS1
VOS
+
=