FiveCo FMod-TCP BOX User Manual page 16

Ethernet converter device
Table of Contents

Advertisement

To be able to do all of these 3 sequences, use this command:
Byte#
0x00
I2CRWwithAck (0x0007)
0x02
TransactionID
0x04
LengthOfParameters (X + 3)
0x06
7 bits Address (bit 7 = 0)
0x07
X (number of bytes to write) 8 bits
0x08
xBytes
....
Y (number of bytes to read)
The four previous entries can be replicated to access the same or other I2C slaves within this
command sequence.
Checksum
If X = 0, the Read method is used.
If Y = 0, the Write method is used.
If X & Y ≠ 0, the Read after Write method is used.
The answer sequence is the following one:
Byte#
0x00
I2CReadAnswer (0x0008)
0x02
TransactionID (same as
demand)
0x04
Number of bytes in answer
0x06
Answer bytes
...
Ack state of the I2C com.
If the same or other I2C slave have been accessed in the command, the answer bytes and ack
state is added here.
...
Checksum
The "Ack state" byte is composed of the following bits:
0
Address ack in write sequence
1
Bytes written ack (each byte was acked)
2
Address ack in read sequence
3-6
Reserved
7
Must be always 1
The user can use these bits to check for the presence of his I2C devices and
monitor hardware issues.
Number of bits
16 bits
16 bits
16 bits
8 bits
X bytes
8 bits
16 bits
Number of bits
Example
16 bits
0x0008
16 bits
0x1254
16 bits
0x0005
Y bytes
0x1A25...
1 byte
0x87
16 bits
0x...
0 = No answer to this address
1 = ack received
0 = Bytes not acknowledged
1 = ack received
0 = No answer to this address
1 = ack received
-
1
FMod-TCP User Manual v.2.8
16 / 58
Example
0x0007
0x1B34
0x0005
0x28
0x02
0xAF1D
0x05
0x...

Advertisement

Table of Contents
loading

Related Products for FiveCo FMod-TCP BOX

This manual is also suitable for:

Fmod-tcp box 2

Table of Contents