Tic36v4 - i2c read - get always same value

I always get the same value (0xAA) when trying to read a register. No matter of which register offset is given (in this example I gave an offset of 0x01).

The attached file shows the signals.

Would you please give me some hints to understand what I am doing wrong?

Hello, Stephane.

It looks like your I2C commands are not formatted properly. If you want to read something from the Tic, then you should use something like the “Get variable” command. There is a good example for how to do this in the “I²C command encoding” section of the Tic user’s guide under the “Block read” header (though I recommend reading that full section carefully).

If you continue having trouble, can you tell me more about your setup, like what device you are using to control the Tic, and post pictures that show all of your connections? Additionally, please post a copy of your Tic settings file. You can save a copy of your Tic settings file from the “File” drop-down menu of the Tic Control Center while a controller is connected via USB.

- Patrick

Hi Richard,
Thx for the feedback.

Setup: Raspberry Pi400 - Tic36V - pigpio lib - I2C

Trying to read value of register 0x26 (current velocity - 32 bit) following the suggested “Block Read” documentation. Here is what is on I2C line when sending [0x1C 0xA1 0x26 - 0x1D] :

Same read result, [0xAA, 0xAA, 0xAA, 0xAA] which is obviously wrong according to the attached setting file (current velocity = 0):
TIC_REG_VALUE.txt (1.8 KB)

Any idea?

I am Patrick; not Richard.

It looks like the file you attached might just be the output of running ticcmd -s --full that was copied and pasted into a text file, but that is not the same as the settings file I asked for. You can save a copy of your Tic settings file by connecting your Tic via USB to a computer running our Tic Control Center software. From the Tic Control Center window, choose the “Save settings file…” option from the “File” drop-down menu.

It still does not look like you are formatting your commands properly. It looks like you are starting all of your commands with a byte containing the unmodified default device address, 0001110b (0x0E in hex; 14 in decimal), but this is not the correct procedure and is probably causing the problem. Instead, as specified by the I²C standard and in the user’s guide section I linked to previously, the first byte should consist of the 7-bit device address followed by a bit to indicate the transfer direction: 0 for writing, 1 for reading. So, if you have not modified the Tic’s default device address, the first byte of the first sequence (which should have 3 bytes total) should be 0x1C, and the first byte of the second sequence should be 0x1D.

- Patrick

Sorry Patrick for the name confusion and for attaching the wrong setting file.

The issue is now solved after carefully following your advices.
Thank you very much.