Data Sheet

Copyright © Terabee 2017
5 I2CProtocolDescription
The TeraRanger Multiflex by default comes in I2C base address (7 bit) 0x55.
Same as when using UART mode, the Multiflex is free running, which means that it will
restart a new measurement as soon as the last one is finished. The displayed data via I2C
protocol is always updated at the end of a measurement. Nevertheless, it can always be
read at any time.
I2C protocol timing diagram
Master
S
Addr
0
Cmd
Stop
S
Addr
1
A
A
NA
Stop
Multiflex
A
A
A
Data1
Data2
DataN
S: one start bit
Addr: Multiflex I2C address on 7 bits
A: one bit of acknowledge
Cmd: one byte which correspond to what the master wants to read
Stop: one stop bit
NA:one bit of non acknowledge
Writing commands to the Multiflex:
1. Send the address byte consisting of a 7 bit base address and the last bit indicating
write (‘0’), e.g. 0xAA for base address 0x55. All commands listed in the table below
are ‘write operations’, the answer will be in the next read operation for which you
have to send the 7 bit address with the read bit set.
2. Send the desired command listed in the table below (see table 5.2.3).
3. In case the command creates an answer, read it back immediately.
Reading data from the Multiflex:
1. Send the address byte consisting of 7 bit base address and the last bit indicating
read (‘1’), e.g. 0xAB for base address 0x55.
2. Read back the the number of bytes imposed by the command, e.g. eighteen bytes
for a distance reading.
Terabee Website:
90RueHenriFabre Technicalsupport:
01630Saint-Genis-Pouilly Commercial:
www.teraranger.com
support@teraranger.com
teraranger@terabee.com
23