
Rev. 1.00
136
October 26, 2018
Rev. 1.00
137
October 26, 2018
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
I
2
C Time-out Control
In order to reduce the problem of I
2
C lockup due to reception of erroneous clock sources, a time-out
function is provided. If the clock source to the I
2
C is not received for a while, then the I
2
C circuitry
and registers will be reset after a certain time-out period. The time-out counter starts counting on an
I
2
C bus “START” & “address match” condition, and is cleared by an SCL falling edge. Before the
next SCL falling edge arrives, if the time elapsed is greater than the time-out setup by the IICTOC
register, then a time-out condition will occur. The time-out function will stop when an I
2
C “STOP”
condition occurs.
Start
SCL
SDA
SCL
SDA
1
0
ACK
Slave Address
SRW
Stop
1
1
0
1
0
1
0
1
0
0
1
0
1
0
0
I
2
C time-out
counter start
I
2
C time-out counter reset
on SCL negative transition
I
2
C Time-out
When an I
2
C time-out counter overflow occurs, the counter will stop and the IICTOEN bit will be
cleared to zero and the IICTOF bit will be set high to indicate that a time-out condition has occurred.
The time-out condition will also generate an interrupt which uses the I
2
C interrupt vector. When an
I
2
C time-out occurs, the I
2
C internal circuitry will be reset and the registers will be reset into the
following condition:
Registers
After I
2
C Time-out
IICD, IICA, IICC0
No change
IICC1
Reset to POR condition
I
2
C Registers after Time-out
The IICTOF flag can be cleared by the application program. There are 64 time-out periods which
can be selected using IICTOS bit field in the IICTOC register. The time-out time is given by the
formula: ((1~64)×32)/f
SUB
. This gives a time-out period which ranges from about 1ms to 64ms.
• IICTOC Register
Bit
7
6
5
4
3
2
1
0
Name
IICTOEN
IICTOF
IICTOS5 IICTOS4 IICTOS3 IICTOS2 IICTOS1 IICTOS0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7
IICTOEN
: I
2
C Time-out control
0: Disable
1: Enable