
Rev. 1.00
132
October 26, 2018
Rev. 1.00
133
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 Control Registers
There are three control registers for the I
2
C interface, IICC0, IICC1 and IICTOC. The IICC0 register
is used to control the enable/disable function and to set the data transmission clock frequency.
The IICC1 register contains the relevant flags which are used to indicate the I
2
C communication
status. Another register, IICTOC, is used to control the I
2
C time-out function and is described in the
corresponding section.
• IICC0 Register
Bit
7
6
5
4
3
2
1
0
Name
—
—
—
—
IICDEB1 IICDEB0
IICEN
—
R/W
—
—
—
—
R/W
R/W
R/W
—
POR
—
—
—
—
0
0
0
—
Bit 7~4
Unimplemented, read as “0”
Bit 3~2
IICDEB1~IICDEB0
: I
2
C Debounce Time Selection
00: No debounce
01: 2 system clock debounce
1x: 4 system clock debounce
Note that the I
2
C debounce circuit will operate normally if the system clock, f
SYS
, is
derived from the f
H
clock or the IAMWU bit is equal to 0. Otherwise, the debounce
circuit will have no effect and be bypassed.
Bit 1
IICEN
: I
2
C Enable Control
0: Disable
1: Enable
The bit is the overall on/off control for the I
2
C interface. When the IICEN bit is cleared
to zero to disable the I
2
C interface, the SDA and SCL lines will lose their I
2
C function
and the I
2
C operating current will be reduced to a minimum value. When the bit is
high the I
2
C interface is enabled. The I
2
C configuration option must have first enabled
the I
2
C interface for this bit to be effective. If the IICEN bit changes from low to high,
the contents of the I
2
C control bits such as HTX and TXAK will remain at the previous
settings and should therefore be first initialised by the application program while the
relevant I
2
C flags such as HCF, HAAS, HBB, SRW and RXAK will be set to their
default states.
Bit 0
Unimplemented, read as “0”
• IICC1 Register
Bit
7
6
5
4
3
2
1
0
Name
HCF
HAAS
HBB
HTX
TXAK
SRW
IAMWU
RXAK
R/W
R
R
R
R/W
R/W
R
R/W
R
POR
1
0
0
0
0
0
0
1
Bit 7
HCF
: I
2
C Bus data transfer completion flag
0: Data is being transferred
1: Completion of an 8-bit data transfer
The HCF flag is the data transfer flag. This flag will be zero when data is being
transferred. Upon completion of an 8-bit data transfer the flag will go high and an
interrupt will be generated.
Bit 6
HAAS
: I
2
C Bus address match flag
0: Not address match
1: Address match
The HAAS flag is the address match flag. This flag is used to determine if the slave
device address is the same as the master transmit address. If the addresses match then
this bit will be high, if there is no match then the flag will be low.