
Rev. 1.00
128
October 26, 2018
Rev. 1.00
129
October 26, 2018
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
Step1: Set OVPCOFM=1, OVPCRS=1, the OVP is now in the comparator offset calibration mode,
S0 and S2 are on. To make sure V
OS
as minimised as possible after calibration, the input
reference voltage in calibration mode should be the same as input DC operating voltage in
normal mode operation.
Step2: Set OVPCOF[4:0]=00000 and then read the OVPCOUT bit status.
Step3: Increase the OVPCOF[4:0] value by 1 and then read the OVPCOUT bit status.
If the OVPCOUT state has not changed, repeat Step3 until the OVPCOUT bit state has
changed.
If the OVPCOUT state has changed, record the OVPCOF[4:0] value as V
OS1
and then go to
Step4.
Step4: Set OVPCOF[4:0]=11111 and then read the OVPCOUT bit status.
Step5: Decrease the OVPCOF[4:0] value by 1 and then read the OVPCOUT bit status.
If the OVPCOUT state has not changed, repeat Step5 until the OVPCOUT bit state has
changed.
If the OVPCOUT state has changed, record the OVPCOF[4:0] value as V
OS2
and then go to
Step6.
Step6: Restore V
OS
=(V
OS1
+V
OS2
)/2 to the OVPCOF[4:0] bits. The calibration is finished.
If (V
OS1
+V
OS2
)/2 is not integral, discard the decimal. Residue V
OS
=V
OUT
- V
IN
.
I
2
C Interface
The I
2
C interface is used to communicate with external peripheral devices such as sensors,
EEPROM memory etc. Originally developed by Philips, it is a two line low speed serial interface
for synchronous serial data transfer. The advantage of only two lines for communication, relatively
simple communication protocol and the ability to accommodate multiple devices on the same bus
has made it an extremely popular interface type for many applications.
Device
Slave
Device
Master
Device
Slave
VDD
SDA
SCL
I
2
C Master Slave Bus Connection
I
2
C Interface Operation
The I
2
C serial interface is a two line interface, a serial data line, SDA, and serial clock line, SCL. As
many devices may be connected together on the same bus, their outputs are both open drain types.
For this reason it is necessary that external pull-high resistors are connected to these outputs. Note
that no chip select line exists, as each device on the I
2
C bus is identified by a unique address which
will be transmitted and received on the I
2
C bus.
When two devices communicate with each other on the bidirectional I
2
C bus, one is known as the
master device and one as the slave device. Both master and slave can transmit and receive data.
However, it is the master device that has overall control of the bus. For this device, which only
operate in slave mode, there are two methods of transferring data on the I
2
C bus, the slave transmit
mode and the slave receive mode. The pull-high control function pin-shared with SCL/SDA pin is