R8C/3MK Group
USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00
Page 26 of 38
Mar 21, 2012
9.2.2
Protocol Conversion of Write Access
When you write data to the I
2
C devices, you send the “Write Access” command packet to the virtual
COM port, and send data packet continuously. Figure 27 shows the protocol conversion of Write Access.
If the data packet length is short (less than 59bytes), you can combined command packet and data packet
to “combined packet”.
USB Packet
Register Address
0x03
S
T
Data(D001)
0x01
S
P
Protocol Conversion of Write Access (Writing 100 Bytes data)
First Packet:
Send Command
Packet
Second Packet:
Send Data Packet (64 bytes)
Device Address
b0000010
W
・・・・・・・・
Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Third Packet:
Send Data Packet (36
bytes)
Control
0x00
DevAdr
0x02
RegAdr
0x03
Len(lower)
0x64
Len(upper)
0x00
Data(D001)
0x01
・・・・・・・・
Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
O
U
T
A
C
K
A
C
K
A
C
K
O
U
T
O
U
T
USB Packet
I
2
C Packet
Register Address
0x03
S
T
Data (D001)
0x01
S
P
Protocol Conversion of Write Access (Using Combined Packet)
(ST=Start/SP=Stop/W=Write)
First Packet:
Send Combined
Packet
First Packet:
Device A
Register Address
+
Write Data
Device Address
b0000010
W
Data (D002)
0x40
Control
0x00
DevAdr
0x02
RegAdr
0x03
Len(lower)
0x02
Len(upper)
0x00
Data(D001)
0x01
Data(D002)
0x40
O
U
T
A
C
K
I
2
C Packet
First Packet:
Device A
Register A
Write Data (100bytes)
(Including I
2
C Bus
Hold)
Figure 27 Protocol Conversion of Write Access