Jump to content
43oh

Recommended Posts

I have a Dig Pot the TPL0501 by Texas Instruments that I am trying to control with a micro controller. 

 

Link Here:

 

http://www.ti.com/lit/ds/slis136a/slis136a.pdf

 

I have been able to successfully control this with my CC3200 and the output signals look like Photo 1 attatched.

 

I have since decided I want to do this with my MSP432 but I am not able to get it to work. The same code should work for each I assume.

 

The output signals I am getting for the MSP432 are shown in photo 2.

 

I have tried changing the mode but nothing seems to help. Any ideas?

 

 

My code is listed below:

 

#include <SPI.h>
 
const int SS = 18;
uint8_t value = 150;
void setup()
{
 
  pinMode(SS, OUTPUT);
  SPI.begin();
  digitalWrite(SS, HIGH);
  SPI.setBitOrder(MSBFIRST);
  SPI.setDataMode(SPI_MODE3);
  SPI.setClockDivider(SPI_CLOCK_DIV32);
 
}
 
void loop()
{
  digitalPotWrite(value);
  delay(100);
  
}
 
 
int digitalPotWrite(int x)
{
digitalWrite(SS, LOW);
SPI.transfer(x);
digitalWrite(SS, HIGH);
}

post-47439-0-55032200-1447375443_thumb.jpg

post-47439-0-54231600-1447375522_thumb.jpg

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...