-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Digital Potentiometer code example needs delay added #6395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Component: Documentation
Related to Arduino's documentation content
Comments
Are you using the exact same chip as mentioned in that tutorial? Did you look up the amount of delay needed in the datasheet? 50ms sounds like a lot more than a typical chip would require. |
Exact same chip... I edited the post. It actually doesn't work reliably
unless delay is 100 ms
…On Jun 19, 2017 11:49 AM, "Matthijs Kooijman" ***@***.***> wrote:
Are you using the exact same chip as mentioned in that tutorial? Did you
look up the amount of delay needed in the datasheet? 50ms sounds like a lot
more than a typical chip would require.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6395 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AcLhMJSWW47mR1WztatLdIirOudlB8zxks5sFqamgaJpZM4N-fOl>
.
|
SimonePDA
pushed a commit
that referenced
this issue
Apr 2, 2018
Fixing SPI communication with a delay as pointe out in #6395
Fixed the sketch, thanks a lot for your testing. |
per1234
added a commit
to per1234/ArduinoCore-sam
that referenced
this issue
Mar 26, 2019
According to arduino/Arduino#6395, these delays are required for the code to work.
This was referenced Mar 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.arduino.cc/en/Tutorial/DigitalPotControl
The code needs a delay to work:
void digitalPotWrite(int address, int value) {
// take the SS pin low to select the chip:
digitalWrite(slaveSelectPin, LOW);
delay(100);
// send in the address and value via SPI:
SPI.transfer(address);
SPI.transfer(value);
delay(100);
// take the SS pin high to de-select the chip:
digitalWrite(slaveSelectPin, HIGH);
}
The text was updated successfully, but these errors were encountered: