AD5206

how to control two AD5206 digital potentiometer with single arduino.

arulnanopix, there may be other forum members or forum visitors that would be interested in knowing how to do this. Please post a link. - Scotty

Do you have a link to the datasheet?

They might be similar as the AD524X for which I wrote a small library

Am new to AD5206. if i get a example project on AD5206. i will make it to control two AD5206. anyone have code means post it.

Apparently no one has code.

Do you have a link to the datasheet?
What information can you provide?

Help us to help you

The code on the playground needs a second Chip select line

const int slaveSelectPin = 10;

e.g.

const int slave2SelectPin = 9;

The other SPI lines can be shared.

In your code you should switch on/off (alternate) between these two slave pins.

The easiest way is to rewrite this core function and call it with either 9 or 10 for the slavePin param

void digitalPotWrite(int slavePin, int address, int value) 
{
  // take the SS pin low to select the chip:
  digitalWrite(slavePin, LOW);

  //  send in the address and value via SPI:
  SPI.transfer(address);
  SPI.transfer(value);

  // take the SS pin high to de-select the chip:
  digitalWrite(slavePin, HIGH);
}

i need full code for AD5206 with a example

arulnanopix:
i need full code for AD5206 with a example

bobtillaart just provided a link to a library which will probably work for your purposes along with instructions on how to use it with two devices.

Perhaps you should hire someone to write your program if you are not willing to attempt writing one using the information which has been provided.

AM FINISHED MY CODE. I DONT KNOW HOW TO GIVE DIGITAL INPUT TO CONTROL ad5206

Hi,
What is your application?
What do you want to use to control the arduino, to control the dual digital pots?
A potentiometer, push buttons?

Tom..... :slight_smile: