Problems writing data into registers. TPL1401 I2C Digital Potentiometer.

Thread Starter

Belmont1010

Joined Nov 17, 2022
2
Hello, and sorry for my English.

I want to use a I2C digital potentiometer (TPL1401) so, before I use it, I'm reading the datasheet (I'm not doing any specific application, I just want to improve my few skills in i2c).
In this moment I don't have the IC physically to test, but in page number 31 there is a pseudocode example and my concern are the values that are written in GENERAL_CONFIG and PROTECT registers.

1668718394538.png


This is the GENERAL_CONFIG register but in the MSB data they write 0x11, why? I dont Have problems with the LSB data (0xE5)

0x11 would be: 0001 0001 and in theory all this bits would be the bits 15-8, right?
i.e.
bits15141312111098
0x1100010001


but why bit 12 is 1? according to the table bits 12-5 are RESERVED and always you must write 0x0F i.e.
bits [12:5]12111098765
0x0F00001111

1668718734141.png


What do you think, could it be an error in the datasheet?
Or am I the one who is wrong haha


Same case for PROTECT Register, they write 0x10 for the LSB Data, and this is the register, agaim, according to the table, bits [3:0] ony have two possible values 1000 or 1010, so, why they write 0x10
1668719677830.png
I would appreciate your answers guys, and thank you very much for reading my concern
 

Attachments

Last edited:

BobaMosfet

Joined Jul 1, 2009
2,053
The CONFIG register at 0xD1 (it's address) takes a 16-bite value:

Code:
15 | 14 | 13 | 12 | 11 | 10 | 09 | 08 | 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
  0    0 |  0 |  1    0    0    0    1    1    1    1 |  0    0 |  1 |  0    0
---------+----+---------------------------------------+---------+----+---------
Per the register:

1668728647868.png

Clearly the datasheet example they provide (0x11E5) is a typo. Bits 12-5 should be 0x00. Follow Table 7-13, not their code example. Same thing goes for any other register. Use their pseudo-code only as a flowchart for how the process is done. Rely on the specific register-related tables for the appropriate values to write.
 

Thread Starter

Belmont1010

Joined Nov 17, 2022
2
The CONFIG register at 0xD1 (it's address) takes a 16-bite value:

Code:
15 | 14 | 13 | 12 | 11 | 10 | 09 | 08 | 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
  0    0 |  0 |  1    0    0    0    1    1    1    1 |  0    0 |  1 |  0    0
---------+----+---------------------------------------+---------+----+---------
Per the register:

View attachment 280964

Clearly the datasheet example they provide (0x11E5) is a typo. Bits 12-5 should be 0x00. Follow Table 7-13, not their code example. Same thing goes for any other register. Use their pseudo-code only as a flowchart for how the process is done. Rely on the specific register-related tables for the appropriate values to write.
Only for clarification: "Bits 12-5 should be 0x00". Should be 0x0F right? jeje
Ok, I understood, thank you very much. I must rely on the information provided by the tables.
 
Top