Connecting an MCP4251 digital potentiometer to a Teensy 3.6 is straight forward.
MCP4251 !CS should be connected to Teensy 3.6 digital pin 0.
MCP4251 SCK should be connected to Teensy 3.6 digital pin 13 SCK0.
MCP4251 SDI should be connected to Teensy 3.6 digital pin 11 MOSI0.
MCP4251 VSS should be connected to Teensy 3.6 ground.
MCP4251 VDD should be connected to Teensy 3.6 3V3.
MCP4251 SDO does not need to be connected.
MCP4251 !SHDN should be connected to Teensy 3.6 3V3.
MCP4251 !WP should be connected to Teensy 3.6 3V3.
Data is written to the chip by using an SPI transfer of B000x0000 (where x is the digital potentiometer channel) followed by Bnnnnnnnn (where nnnnnnnn is a number from 0 - 255 for the pot data). See below for an Arduino-based code example and breadboard setup.
2 comments:
Hello, I'm working on a project using the MCP4251, but I have one question I've yet to find an answer to, what does the WP pin do? Connecting it to power is easy, but what's it for? Even the datasheet didn't really help me with this.
@Whoopwhoop3 this is for write protect
Post a Comment