R8C/3MK Group
USB-to-Serial Communication Conversion Demo Board
R0K5R8C3MDU30BR Instruction Manual
R01AN1051EJ0100 Rev.1.00
Page 25 of 38
Mar 21, 2012
9.2
Specification of USB -to - I
2
C Protocol Conversion
9.2.1
Protocol conversion of Read Access
When you read data from I
2
C devices, you enter the “Read Access” command to the virtual COM port,
and receive data packet from the virtual COM port. Figure 26 shows the protocol conversion of the Read
Access.
USB Packet
Command
0x02
DevAdr
0x02
RegAdr
0x03
Len(lower)
0x02
Len(upper)
0x00
Data(D001)
0x01
I
2
CPacket
Register
Address
0x03
Data(D001)
0x01
S
P
Protocol Conversion of Read Access (Receiving 100 bytes data )
(ST=Start/SP=Stop/W=Write/R=Read)
First Packet:
Send Command
Packet
Second Packet:
Receive Data Packet
(64bytes)
First Packet:
Send Command
Packet
Second Packet:
Receive Data Packet
S
T
Device Address
b0000010
W
S
T
Device Address
b0000010
R
・・・・・・・・
Data(D064)
0x40
・・・・・・・・
Data(D064)
0x40
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
S
P
Data(D065)
0x41
Data(D100)
0x64
・・・・・・・・
Third Packet:
Receive Data Packet
(36bytes)
Figure 26 Protocol Conversion of Read Access