EasyManua.ls Logo

Linear Technology LTC6804-1 - Page 56

Default Icon
78 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
LTC6804-1/LTC6804-2
56
680412fc
For more information www.linear.com/LTC6804-1
This example uses a single LTC6804-1 to write a byte
of data to an I
2
C EEPROM. The LTC6804 will send three
bytes of data to the I
2
C slave device. The data sent will be
B0 = 0xA0 (EEPROM address), B1
= 0x01 (write com-
mand), and B2 =
0xAA (data to be stored in EEPROM).
The three bytes will be transmitted to the I
2
C slave device
in the following format:
START – B0 – NACK – B1 – NACK – B2 – NACK – STOP
1. Write data to COMM register using WRCOMM command
a. Pull CSB low
b. Send WRCOMM command (0x07 0x21) and its PEC
(0x24 0xB2)
c. Send
COMM0 = 0x6A, COMM1 = 0x08 ([START] [B0]
[
NACK]),
COMM2 = 0x00, COMM3 = 0x18 ([BLANK] [B1]
[NACK]),
COMM4 = 0x0A, COMM5 = 0xA9 ([BLANK] [B2]
[NACK+STOP])
and PEC = 0x6D 0xFB for the above data
d. Pull CSB high
2. Send the 3 bytes of data to I
2
C slave device using
STCOMM command
a. Pull CSB low
b. Send STCOMM command (0x07 0x23) and its PEC
(0xB9 0xE4)
c. Send 72 clock cycles on SCK
d. Pull CSB high
3. Data transmitted to slave during the STCOMM com-
mand is stored in the COMM register. Use the RDCOMM
command to retrieve the data
a.
Pull CSB low
b. Send RDCOMM command (0x07 0x22) and its PEC
(0x32 0xD6)
c. Read COMM0-COMM5 and the PEC for the 6 bytes
of data.
Assuming the slave acknowledged all 3 bytes of data,
the read back data in this example would look like:
COMM0 = 0x6A, COMM1 = 0x07, COMM2 = 0x70,
COMM3 = 0x17, COMM4 = 0x7A, COMM5 = 0xA1,
PEC = 0xD0 0xDE
d. Pull CSB high
Note: If the slave returns data, this data will be placed in
COMM0-COMM5.
Figure 26 shows the activity on GPIO5 (SCL) and GPIO4
(SDA) ports of the I
2
C master for 72 clock cycles during
the STCOMM command in the above example.
Figure 26. LTC6804 I
2
C Communication Example
680412 F26
SDA (GPIO4)
SCL (GPIO5)
START
ACK FROM SLAVE
0xA0 0x01 0xAA
SCK
STOP
LAST CLOCK OF
STCOMM COMMAND
ACK FROM SLAVE ACK FROM SLAVE
operaTion