Hi everyone
I'm having problems connecting 3 digital Potentiometers with the Arduino UNO. I'm using the AD5290 from Analog Devices in a daisy chain configuration (see the data sheet)
https://www.analog.com/media/en/technical-documentation/data-sheets/AD5290.pdf
This is a one channel digi pot. I only want to raise the value of all three potentiometers to the maximum or minimum, to see if they work. Here is my code:
#include <SPI.h>
const int slaveSelectPin = 10;
void setup() {
// set the slaveSelectPin as an output:
pinMode(slaveSelectPin, OUTPUT);
// initialize SPI:
SPI.begin();
SPI.setClockDivider(SPI_CLOCK_DIV4);
digitalWrite(slaveSelectPin, LOW);
//delay(100);
SPI.transfer(255); // Data for the last Pot in the daisy chain
SPI.transfer(255);
SPI.transfer(255); // Data for the first pot in the daisy chain
delay(100);
digitalWrite(slaveSelectPin, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
}
All three are in mid position and don't change at all!
Is the code correct? I only need to send the date three time for all pots in the daisy chain. They are all single channel, so I don't need to send a command byte, right?
What else could be wrong?
Thanks for your help