
Rev. 1.00
120
October 26, 2018
Rev. 1.00
121
October 26, 2018
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
Over Current Protection – OCP
The device includes an over current protection function which provides a protection mechanism
for applications. The current on the OCPI pin is converted to a relevant voltage level according to
the current value using the OCP operational amplifier. It is then compared with a reference voltage
generated by an 8-bit D/A converter. When an over current event occurs, an OCP interrupt will be
generated if the corresponding interrupt control is enabled.
OCPI
OCPAO
OCP interrupt
OCPCHY
S4
-
+
G[2:0]
R2
OPA
+
-
OCPCOUT
Debounce
OCPO
OCPDEB[2:0]
R1
(R1 = 4K)
OCPEN[1:0]
OCPDA[7:0]
f
SYS
S0
S1
S2
S3
CMP
V
OCPAO
(To A/D Converter)
8-bit
DAC
M
U
X
OCPVRS
AV
DD
OCPVR
Note: As the OCP function relevant external pins are pin-shared with general I/O or other functions, before using
the OCP function, make sure the corresponding pin-shared function registers be set properly.
Over Current Protection Circuit
Over Current Protection Operation
The OCP circuit is used to prevent the input current from exceeding a specific level. The current on
the OCPI pin is converted to a voltage and then amplified by the OCP operational amplifier with a
programmable gain from 1 to 50 selected by the G2~G0 bits in the OCPC1 register. This is known
as a Programmable Gain Amplifier or PGA. This PGA can also be configured to operate in the non-
inverting, inverting or input offset calibration mode determined by the OCPEN1~OCPEN0 bits in
the OCPC0 register. After the current is converted and amplified to a specific voltage level, it will
be compared with a reference voltage provided by an 8-bit D/A converter. The 8-bit D/A converter
reference voltage can be supplied by AV
DD
or external OCPVR pin, which is selected by the
OCPVRS bit in the OCPC0 register. The comparator output, OCPCOUT, will first be filtered with
a certain de-bounce time period selected by the OCPDEB2~OCPDEB0 bits in the OCPC1 register.
Then a filtered OCP digital comparator output, OCPO, is obtained to indicate whether an over
current condition occurs or not. The OCPO bit will be set to 1 if an over current condition occurs.
Otherwise, the OCPO bit is zero. Once an over current event occurs, i.e., the converted voltage
of the OCP input current is greater than the reference voltage, the corresponding interrupt will be
generated if the relevant interrupt control bit is enabled.
Note that the debounce clock, f
DEB
, comes from the system clock, f
SYS
. The operational amplifier
output voltage can be directly output on the OCPAO pin, and also can be read out by the A/D
converter through an A/D internal input channel. The D/A converter output voltage is controlled by
the OCPDA register and the D/A converter output is defined as below:
DAC V
OUT
=(D/A converter reference voltage/256)×OCPDA[7:0]