I2C Bus scanning
The following command allows user to ask an I2C bus scanning to list which
addresses answer with an acknowledge.
I2C scan command:
Byte#
Number of bits
Example
0x00 I2CScan (0x0005)
16 bits
0x0005
0x02 TransactionID
16 bits
0x2001
0x04 Number of addresses to scan 16 bits
0x0001
0x08 X Addresses
X bytes
0x1A
Checksum
16 bits
0x…
Note: If there is no address in the I2C Scan command, the FMod-TCP BOX
2 will scan all addresses between 1 and 127!
I2C scan answer:
The FMod-TCP BOX 2 answers with the following sequence:
Byte#
Number of bits
Example
0x00 I2CScanAnswer (0x0006)
16 bits
0x0006
0x02 TransactionID (same as
demand)
16 bits
0x2001
0x04 Number of valid addresses 16 bits
0x0001
0x06 Valid addresses list
n bytes
0x1A
Checksum
16 bits
0x…
I2C speed change (advanced features)
The I2C bus speed can be changed at any time by changing the content of
the I2CSPD parameter.
Beware:
1.
Do not change I2C speed if it is not mandatory. Speed greater than
100kHz are not supported by all I2C slaves.
2.
Do not change I2C speed during I2C communication.
3.
The I2C controller does not match all I2C specifications at speed
higher than 100kHz. This feature will therefore not work with all I2C
slaves.
4.
The FMod-TCP BOX 2 does not support speed greater than
400kHz.
The value of the I2CSPD parameter must be computed with the following
formula:
Содержание FMod-TCP BOX 2
Страница 2: ......
Страница 11: ...EEPROM In this case you do not need to send the Save Parameters command ...