Skip to content

Arduino library for Microchip 2-wire MCP40xx 64 resistors (63 taps) digital potentiometer

Notifications You must be signed in to change notification settings

dzalf/MCP40xx_Digital_Potentiometer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP40xx_Digital_Potentiometer

Arduino/Teensy library for Microchip MCP4011/12/13/14 64 taps digital potentiometer

Library usage:

  1. Instantiate a new object as:

    MCP40xx digipot(CS Pin, UD Pin)

    1.1 An overloaded constructor is available. It makes possible to debug the code via a third element:

    MCP40xx digipot(CS Pin, UD Pin, true/false)

  2. Setup and begin the digital pot:

    digipot.setup() --> assigns and initialises the digital pins digipot.begin() --> sets the initial position of the wiper

    #TODO: set three possible states: minimum wiper (done!), 50% wiper or max wiper(done!)

  3. Increase/decrease the pot's value using the inc()/dec() methods.

  4. Methods for retrieving the approximate resistance value, tap position and increment/decrement times (in microseconds) are included.

Please read both .h and .cpp files as they are self-explanatory.

If you have any suggestions/pull requests please feel free to join me on the development.

Let's work together 😃

Happy tinkering 🍺

dzalf

About

Arduino library for Microchip 2-wire MCP40xx 64 resistors (63 taps) digital potentiometer

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages