Datasheet
MCP2221
DS20005292A-page 40 2014 Microchip Technology Inc.
3.1.6 I
2
C™ WRITE DATA
REPEATED-START
This command is used to write user-given data to the
I
2
C Slave device (whose address and speed are
specified by the STATUS/SET Parameters command).
The command will have the following effects:
•The I
2
C engine will send the “Repeated-START”
condition.
• The selected I
2
C slave address is sent next, and
the I
2
C engine will wait for the slave to send an
acknowledge bit.
• The user data follows next, and the I
2
C engine
waits for the acknowledge bit from the slave.
• If the requested length is more than 60 bytes,
subsequent user bytes will be sent on the bus.
• When the user data length (being sent on the bus)
reaches the requested length, the I
2
C engine will
send the “STOP” condition on the bus.
3.1.6.1 Responses
TABLE 3-22: COMMAND STRUCTURE
(1)
Byte
Index
Value Effect
00x92
I
2
C Write Data Repeated-START – command code
(cI2C_CMD_RSTART_WRDATA7)
1 0x00 Requested I
2
C transfer length –
16-bit value – low byte
2 0x03 Requested I
2
C transfer length –
16-bit value – high byte
3Don’t
care
4-63 User data to be sent to the selected I
2
C slave device
Note 1: When the requested transfer length is more than 60 bytes, subsequent “I2C Write Data Repeated-START”
commands will transport the reminder of the user data (till the requested length).
TABLE 3-23: RESPONSE 1 STRUCTURE
Byte
Index
Value Effect
00x92
I
2
C Write Data Repeated-START – command code echo
(cI2C_CMD_RSTART_WRDATA7)
1 0x00 Command completed successfully
0x01 I
2
C Engine is busy
(command not completed)
2 0x03 Internal I
2
C Engine state (at the moment the command was issued) – useful for monitoring the
status of the I
2
C Engine
3-63 Don’t
care