![FTDI FT51A Скачать руководство пользователя страница 42](http://html1.mh-extra.com/html/ftdi/ft51a/ft51a_application-note_2341158042.webp)
Application Note
AN_289 FT51A Programming Guide
Version 1.0
Document Reference No.: FT_000962 Clearance No.: FTDI# 483
41
Copyright © 2015 Future Technology Devices International Limited
2.5
I
2
C Master
The I
2
C is an industry standard communications interface. Devices communicate in Master or Slave
mode, with the Master initiating the data transfer.
The I
2
C Master module has two signals:
-
Clock (SCL)
-
Data (SDA)
The I
2
C Master transmits any data by prefixing it with an I
2
C Slave address. The Least Significant
Bit of the address specifies a Read or Write operation.
Figure 2.3 I
2
C Master Schematic Diagram
The registers associated with the I
2
C Master are outlined in
Table 2.44. These are accessed using
SFRs directly.
SFR
Address
Register Name
Description
0xF4
Slave Address register.
0xF5
Control register (write operation).
0xF5
Status register (read operation).
0xF6
Transmitted/received data register.
0xF7
Timer period register.
Table 2.44 I
2
C Master Register Addresses
2.5.1
I2CMSA
Bit
Position
Bit Field Name
Type
Reset
Description
7..1
Addr
R/W
0
Slave address MSB bits 7..1
0
R/S
R/W
0
Receive/Send
Table 2.45 I
2
C Master Slave Address Register
The Slave Address register sets the address of the I
2
C Slave. The most significant 7 bits of the
address are set in this register. The least significant bit is ‘1’ for a receive transaction or ‘0’ for a
send transaction.
I
2
C Master
External -
I
2
C Slave
SCL
SDA