user54963: I want to use the ADG731 32 ch multiplexer to read 32 potentiometers, I have wired everything and it works but it doesn't works as fast as I would want.
The problem is that If I turn a potentiometer between the range of 10-90% of the rotation, the analog reading is so slow, for example, if I have my POT at 0, and i turn it to 50%, it goes so slow until it reach the 512 value(like an hysteresis effect), BUT, if I turn the potentiometer back to 0 or up to 1023 it makes the reading as quick as I would expect. 
So in resume it reads slowly the values except the edges values.
This is my code(I have set it to read only one potentiometer at pin S16 to test how the ADG731 works:
#include <SPI.h>

void loadDrain(void);
const int slaveSelectPin = 53;
void setup() {
  pinMode(slaveSelectPin, OUTPUT);
  SPI.begin();
  Serial.begin(9600);
}

void loop() {
  loadDrain();
}

void loadDrain(){
  SPI.beginTransaction(SPISettings(30000000, MSBFIRST, SPI_MODE2));
  digitalWrite(slaveSelectPin, LOW);
  SPI.transfer(00001111);
  digitalWrite(slaveSelectPin, HIGH);
  SPI.endTransaction();
  Serial.println(analogRead(A0) >> 3);
}


user20245: Take a deep look into the library you are using to read the POT. Most HW and / or SW will take many readings & average them to remove the randomness and improve the accuracy of the ADC HW. It could be that your setup is so noisy that the SW is compensating by taking even more readings to average. Hats off the the SW developer who had the foresight to adapt the code to noisier situations. If true, and you think that too much automation, remember you are using the Arduino platform where the libraries are designed to make things simple by abstracting (hiding) the hardware details.

54963: <p>I want to use the ADG731 32 ch multiplexer to read 32 potentiometers, I have wired everything and it works but it doesn't works as fast as I would want.</p>

<p>The problem is that If I turn a potentiometer between the range of 10-90% of the rotation, the analog reading is so slow, for example, if I have my POT at 0, and i turn it to 50%, it goes so slow until it reach the 512 value(like an hysteresis effect), BUT, if I turn the potentiometer back to 0 or up to 1023 it makes the reading as quick as I would expect. </p>

<p>So in resume it reads slowly the values except the edges values.</p>

<p>This is my code(I have set it to read only one potentiometer at pin S16 to test how the ADG731 works:</p>

<pre><code>#include &lt;SPI.h&gt;

void loadDrain(void);
const int slaveSelectPin = 53;
void setup() {
  pinMode(slaveSelectPin, OUTPUT);
  SPI.begin();
  Serial.begin(9600);
}

void loop() {
  loadDrain();
}

void loadDrain(){
  SPI.beginTransaction(SPISettings(30000000, MSBFIRST, SPI_MODE2));
  digitalWrite(slaveSelectPin, LOW);
  SPI.transfer(00001111);
  digitalWrite(slaveSelectPin, HIGH);
  SPI.endTransaction();
  Serial.println(analogRead(A0) &gt;&gt; 3);
}
</code></pre>
 20245: <p>Take a deep look into the library you are using to read the POT. Most HW and / or SW will take many readings &amp; average them to remove the randomness and improve the accuracy of the ADC HW. It could be that your setup is so noisy that the SW is compensating by taking even more readings to average. Hats off the the SW developer who had the foresight to adapt the code to noisier situations. If true, and you think that too much automation, remember you are using the Arduino platform where the libraries are designed to make things simple by abstracting (hiding) the hardware details.</p>
