
Rev. 1.21
122
�ove��e� ��� 2�1�
Rev. 1.21
123
�ove��e� ��� 2�1�
HT66F488/HT66F489
A/D Flash MCU with EEPROM
HT66F488/HT66F489
A/D Flash MCU with EEPROM
I
2
C Register
There are four control registers associated with the I
2
C bus, SIMC0, SIMC1, SIMA and SIMTOC
and one data register, SIMD. The SIMD register, which is shown in the above SPI section, is used to
store the data being transmitted and received on the I
2
C bus. Before the microcontroller writes data
to the I
2
C bus, the actual data to be transmitted must be placed in the SIMD register. After the data is
received from the I
2
C bus, the microcontroller can read it from the SIMD register. Any transmission
or reception of data from the I
2
C bus must be made via the SIMD register.
Note that the SIMA register also has the name SIMC2 which is used by the SPI function. Bit SIMEN
and bits SIM2~SIM0 in register SIMC0 are used by the I
2
C interface. The SIMTOC register is used
for I
2
C time-out control function.
Register
Name
Bit
7
6
5
4
3
2
1
0
SIMC�
SIM2
SIM1
SIM�
—
SIMDEB1 SIMDEB� SIME�
SPIICF
SIMC1
HCF
HAAS
HBB
HTX
TXAK
SRW
RCI�
RXAK
SIMD
D�
D6
D5
D4
D3
D2
D1
D�
SIMA
IICA6
IICA5
IICA4
IICA3
IICA2
IICA1
IICA�
D�
SIMTOC SIMTOE� SIMTOF SIMTOS5 SIMTOS4 SIMTOS3 SIMTOS2 SIMTOS1 SIMTOS�
I
2
C Register List
SIMC0 Register
Bit
7
6
5
4
3
2
1
0
�a�e
SIM2
SIM1
SIM�
—
SIMDB�C1 SIMDB�C� SIME�
SPIICF
R/W
R/W
R/W
R/W
—
R/W
R/W
R/W
R/W
POR
1
1
1
—
�
�
�
�
Bit 7 ~ 5
SIM2~SIM0
: SIM Operating Mode Control
000: SPI master mode; SPI clock is f
SYS
/4
001: SPI master mode; SPI clock is f
SYS
/16
010: SPI master mode; SPI clock is f
SYS
/64
011: SPI master mode; SPI clock is f
SUB
100: SPI master mode; SPI clock is CTM CCRP match frequency/2
101: SPI slave mode
110: I
2
C slave mode
111: Unused mode
These bits setup the overall operating mode of the SIM function. As well as selecting
if the I
2
C 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 CTM. If the SPI Slave Mode is selected
then the clock will be supplied by an external Master device.
Bit 4
Unimplemented, read as “0”
Bit 3 ~ 2
SIMDBNC1~SIMDBNC0
: I
2
C Debounce Time Selection
00: No debounce
01: 2 system clocks debounce
1x: 4 system clocks debounce