This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPL0102-100: How to programme TPL0102-100 in Arduino IDE

Part Number: TPL0102-100

Hi, 

I need help on how to programme the digital potentiometer in Arduino IDE; the libraries and the code. I have connected both channels in series to provide a total resistance of 200k ohms. The code should be able to adjust the resistance from 0-200k ohms

Kind regards,

Bright

  • Application is to control the frequency of a PWM controller from the RT pin to GND. By adjusting the resistance of the RT pin, it changes the frequency. See the attached image. 

    Thank you

  • Hi Bright, 

    We don't have code/libraries available for this device. This device uses I2C communication. You should be able to find I2C code examples for Arduino, and then I can help you understand how to change the output of the TPL. 

    The table in pages 15 - 20 of the TPL datasheet include each of the data codes in binary and hex to send the device based on each desired wiper position

     

    To update the outputs in series, you can set channel A and channel B to the same data value as you go from zero -scale (0Ω + 0Ω) to full-scale (100kΩ + 100kΩ). Alternatively, first go from zero-scale to full-scale on channel A to get from 0Ω to 100kΩ, then go from zero-scale to full-scale on channel A to get from 100kΩ to 200kΩ

    You'll need to write to the device in the following format: I2C address, register address, and 8-bit data to update the TPL wiper position.

    The different register addresses (shown in binary and hex on page 26) show you which address correspond to which output channel:

    The I2C address is as below, depending on how you have configured A2, A1, and A0:

    I did a quick google search and there are existing libraries available for Arduino and the TPL0102. Although these are not provided by TI, they might give you a good starting point.

    Best,

    Katlynne Jones

  • Hi Katlynne,

    Thank you for the reply.

    Kind regards,

    Bright