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 Flipped Resistances Question



Hello,

I am writing to the TPL0102 with the C2000 microcontroller. I can see the waveform that I am writing on a scope and everything looks correct except for one thing. 

When I measure resistance from high-wiper and wiper-low, the values are reversed from what they should be. For example, writing 11110000 should give me 93.75 Kohms High-Wiper and 6.25 Kohms Wiper-Low. Instead I'm getting 6.25 Kohms High-Wiper and 93.75 Kohms Wiper-Low. I've checked the pin connections several times and I'm convinced that there are no errors. I get these results on both potentiometers on the device and when I read back the registers using the C2000, I read back 11110000 (the initial data that I wrote).

I was wondering how the TPL0102 saves memory. Is the first bit in a register the MSB or the LSB? The C2000 I2C module transmits MSB first. If these aren't aligned, then that could explain the error. Otherwise, do you have any other suggestions as to what might be wrong?

Thanks,

Matthew 

  • Hello Matthew,

    The device is functioning properly.  I think you have mixed up the formulas for HW and WL. I have attached them here for your viewing.  Plugging in the numbers for D = 240 you will see that RWL = 93.75k and RHW = 6.25 k.  If your hardware is set a simple software fix can flip the resistances.

    Let me know if you have any questions on this.

    Regards,

    Andrew

  • Oh in that case, the data sheet for the TPL0102 is incorrect. I didn't actually use the calculations, I just pulled the numbers for D=240 from the data sheet.

    Thanks! 

    Matthew