Saturday, November 23, 2013

TPL0401 Arduino

Continuando con el post sobre el potenciometro digital TPL0401 de Texas Instruments. hemos realizado una placa PCB para soldar el chip que viene en formato SC-70.
 conectamos una placa compatible arduino y cargamos el siguiente codigo:

#include <Wire.h>

void setup()
{
  Wire.begin(); // Initialize i2c bus
}

byte pot = 127;    //0 = 10K  ,  127 = 0K

void loop()
{
  Wire.beginTransmission(46); // device address  TPL04001-A #46 (0x2E) ,  TPL04001-B #46 (0x2E)
  Wire.write(byte(0x00));     // sends instruction.  0x00 = Write
  Wire.write(pot);            // sends value
  Wire.endTransmission();     // end transmission
}
La conexion es sencilla, 5V, Ground, lineas SDA y SDL para conectar con arduino, y las salidas del potenciometro digital.
Si alguien quiere que le mande una placa PCB para soldar el integrado que lo pida en comentarios.
El chip se puede pedir como sample a Texas Instruments, solo hay que abrirse una cuenta de estudiante.
Eso es todo amigos!

1 comment:

  1. Hi,
    I try your sketch for the TPL0401. Nothing change.
    I have also try a second TPL0401.
    Can you confirm that the code is correct?
    I can not find from TI how to control this device.

    ReplyDelete