Arduino Library for the Maxim MAX5481-5484 Digital Potentiometers
This library implements functions to control the MAX5481 digital Potentiometer(s) using SPI
See the Maxim Integrated datasheet for details MAX5481
These defines can be used to determine the current version of the library being used in your code.
Instantiation of the Digital Potentiometer sets the Slave Select Pin. During the instantiation of the library the Slave Select Pin is pulled High
MAX5481 myDpot(SSPIN);
SSPIN: (parameter required) Slave Select Pin of the Digital Potentiometer on the SPI bus
None
// Instantiation of MAX5481 Digital Potentiometer
MAX5481 myDpot(11);
Initializes the Digital Pot, setting the Slave Select Pin High
begin();
None
None
// Initializes the the MAX5481, pulling the Chip Select ping High
myDpot.begin();
Sets the wiper to the given value
setWiper(value);
value: an integer value between 0-1024
None
// Sets the Digital Potentiometer wiper to a given value
setWiper(wiper_value);
Writes the current value of the wiper to NVM (Non-Volitle Memory)
writeWiper();
None
None
// Sets the Digital Potentiometer wiper to a given value
writeWiper();
Sets the value in NVM into the wiper
readWiper();
None
None
// Moves the value in NMV into the wiper
readWiper();
This library was inspired by previous works done by Gabriel Staples and Others.
http://forum.arduino.cc/index.php?topic=242376.0
http://www.electricrcaircraftguy.com/2016/11/MAX5481-DigitalPotentiometer.html
If you like and use this library please consider making a small donation using PayPal