English
Language : 

BS84B06A-3 Datasheet, PDF (86/119 Pages) Holtek Semiconductor Inc – Touch A/D Flash MCU
BS84B06A-3
Touch A/D Flash MCU
SIMC0 Register
Bit
7
6
5
4
3
2
1
0
Name
SIM2
SIM1
SIM0
—
—
—
SIMEN
—
R/W
R/W
R/W
R/W
—
—
—
R/W
—
POR
1
1
1
—
—
—
0
—
Bit 7 ~ 5
Bit 4~2
Bit 1
Bit 0
SIM2~SIM0: SIM Operating Mode Control
000: SPI master mode; SPI clock is fSYS/4
001: SPI master mode; SPI clock is fSYS/16
010: SPI master mode; SPI clock is fSYS/64
011: SPI master mode; SPI clock is fSUB
100: SPI master mode; SPI clock is TIMER Overflow frequency/2
101: SPI slave mode
110: I2C mode
111: Reserved
These bits setup the overall operating mode of the SIM function. As well as selecting
if the I2C or SPI function, they are used to control the SPI Master/Slave selection and
the SPI Master clock frequency. The SPI clock is a function of the system clock but
can also be chosen to be sourced from the fSUB or Timer/Event counter. If the SPI Slave
Mode is selected then the clock will be supplied by an external Master device.
unimplemented, read as "0"
SIMEN: SIM Control
0: Disable
1: Enable
The bit is the overall on/off control for the SIM interface. When the SIMEN bit is cleared
to zero to disable the SIM interface, the SDI, SDO, SCK and SCS, or SDA and SCL lines
will be as I/O function and the SIM operating current will be reduced to a minimum
value. If the SIM is configured to operate as an SPI interface via the SIM2~SIM0 bits, the
contents of the SPI control registers will remain at the previous settings when the SIMEN
bit changes from low to high and should therefore be first initialised by the application
program. If the SIM is configured to operate as an I2C interface via the SIM2~SIM0 bits
and the SIMEN bit changes from low to high, the contents of the I2C 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 I2C flags such as HCF, HAAS,
HBB, SRW and RXAK will be set to their default states.
Unimplemented, read as "0"
SIMC1 Register
Bit
Name
R/W
POR
7
HCF
R
1
6
HAAS
R
0
5
HBB
R
0
4
HTX
R/W
0
3
TXAK
R/W
0
2
SRW
R
0
1
RNIC
R/W
0
0
RXAK
R
1
Bit 7
Bit 6
HCF: I2C 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.
HAAS: I2C 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.
Rev. 1.30
86
June 30, 2016