I
2
C Bus Serial Interface
The I
2
C bus is a bidirectional 2-wire communication interface originally developed by Philips Semi-
conductors. The possibility of transmitting and receiving data on only 2 lines offers many new appli-
cation possibilities for microcontroller based applications and for this reason, with the exception of
the HT46R47/HT46C47 devices, an I
2
C bus is implemented in each of the microcontrollers in the
Holtek A/D MCU range. The I
2
C bus function is selectable via a configuration option.
There are two lines associated with the I
2
C bus, the first is known as SDA and is the Serial Data
line, the second is known as SCL line and is the Serial Clock line. As many devices may be con-
nected together on the same bus, their outputs are both open drain types. For this reason it is nec-
essary 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 transmit-
ted 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 the Holtek microcontrollers,
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. Four registers exist to control the I
2
C bus and its
associated data transfer, HADR, HCR, HSR and HDR. Communication on the I
2
C bus requires
four steps, a START signal, a slave address transmission, a data transmission and finally a STOP
signal.
54
A/D Type MCU
I
2
C D a t a R e g i s t e r
( H D R )
S l a v e A d d r e s s R e g i s t e r
( H A D R )
S h i f t R e g i s t e r
H T X
D i r e c t i o n C o n t r o l
M
U
X
A d d r e s s M a t c h
( H A A S )
I
2
C I n t e r r u p t
S C L
S D A
D a t a I n ( T o L S B )
D a t a O u t ( F r o m M S B )
T r a n s m i t / R e c e i v e
C o n t r o l U n i t
H C F , 8 - b i t D a t a C o m p l e t e
H B B , D e t e c t S t a r t o r S t o p
D a t a B u s
A d d r e s s
C o m p a r a t o r
T X A K , E n a b l e / D i s a b l e A c k n o w l e d g e
S R W , R e a d / w r i t e S l a v e
Summary of Contents for HT46R22
Page 7: ...vi A D Type MCU...
Page 9: ...viii A D Type MCU...
Page 10: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Page 11: ...2 A D Type MCU...
Page 90: ...P a r t I I Programming Language Part II Programming Language 81...
Page 91: ...82 A D Type MCU...
Page 97: ...88 A D Type MCU...
Page 128: ...P a r t I I I Development Tools Part III Development Tools 119...
Page 129: ...120 A D Type MCU...
Page 140: ...Appendix Appendix 131...
Page 141: ...132 A D Type MCU...
Page 151: ...142 A D Type MCU...
Page 152: ...A p p e n d i x B Package Information Appendix B Package Information 143 B...
Page 161: ...A D Type MCU...
Page 162: ...Amendments...