
Rev. 1.00
126
October 26, 2018
Rev. 1.00
127
October 26, 2018
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
Step6. Restore the comparator input offset calibration value V
COS
into the OCPCOF[4:0] bit field.
The offset Calibration procedure is now finished.
Where V
COS
=(V
COS1
+V
COS2
)/2
Note: S4 is on and the D/A converter is off. This situation is only available for comparator calibration
procedure. In the normal operation mode, S4 is off.
Over Voltage Protection – OVP
The device includes an over voltage protection function which provides a protection mechanism for
applications. The input voltage on the OVPI0 or OVPI1 pin is compared with a reference voltage
generated by an 8-bit D/A converter. When a preset voltage condition occurs, an OVP interrupt will
be generated if the corresponding interrupt control is enabled.
-
+
AV
DD
OVPI0
CMP
OVPEN
OVPDA[7:0]
HYS[1:0]
OVP interrupt
Debounce
OVPDEB[2:0]
OVPO
OVPSPOL
OVPI1
OVPS[1:0]
OVPCOUT
f
SYS
OVPCOUT
S1
S0
S2
1
1
ON OFF ON
OVPCOFM OVPCRS S0 S1
x
0
0
1
S2
ON
OFF
ON
ON
OFF
ON
x: Don't care
8-bit
DAC
Note: As the OVP function relevant external pins are pin-shared with general I/O or other functions, before using
the OVP function, make sure the corresponding pin-shared function registers be set properly.
Over Voltage Protection Circuit
Over Voltage Protection Operation
The OVP circuit is used to prevent the input voltage from being in an unexpected level range. The
voltage can be sourced from the OVPI0 or OVPI1 pin which is determined by the OVPS1~OVPS0
bits in the OVPC2 register. The selected OVP input voltage is compare with a reference voltage
provided by an 8-bit D/A converter. The 8-bit D/A converter reference input signal is supplied by
the positive power supply, AV
DD
. The comparator output, OVPCOUT, will first be filtered with a
certain de-bounce time period selected by the OVPDEB2~OVPDEB0 bits in the OVPC0 register.
Then a filtered OVP digital comparator output, OVPO, is obtained to indicate whether a user-defined
voltage condition occurs or not.
If the OVPSPOL bit is cleared to 0 and the comparator inputs force the OVPO bit to change from
0 to 1, or if the OVPSPOL bit is set to 1 and the comparator inputs force the OVPO bit changes
from 1 to 0, the corresponding interrupt will be generated if the relevant interrupt control bit is
enabled. Therefore, the OVPSPOL bit must be properly configured according to user’s application
requirements. The comparator in the OVP circuit also has hysteresis function controlled by the
HYS1~HYS0 bits.
Note that the debounce clock, f
DEB
, comes from the system clock, f
SYS
. The D/A converter output
voltage is controlled by the OVPDA register, the D/A converter output is defined as below:
DAC V
OUT
=(D/A converter reference voltage/256)×OVPDA[7:0]