Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi,
In my eyes it is very likely that you confuse yourself with this symbol and it´s wrong pin numbering.
Please draw a more suitable schematic. Even hand drawn will be better.
As written in post#2 --> we need more information.
Klaus
// inslude the SPI library:
#include <SPI.h>
// set pin 10 as the slave select for the digital pot:
//const int slaveSelectPin = 10;
const int slaveSelectPin = 53; //WAS 10 on Arduino uno.
const int shutdownPin = 49; // was 7 on uno.
const int wiper0writeAddr = B00000000;
const int wiper1writeAddr = B00010000;
const int analogInPin_c = A5;
void setup() {
// set the slaveSelectPin as an output:
pinMode(slaveSelectPin, OUTPUT);
// initialize SPI:
SPI.begin();
pinMode (shutdownPin, OUTPUT);
// start with all the pots shutdown
digitalWrite(shutdownPin, LOW);
}
void loop() {
delay(2);
digitalWrite(slaveSelectPin, LOW);
digitalWrite(shutdownPin, HIGH); //Turn off shutdown THIS MAKE WRITEABLE OR DISABLE THIS CAN'T WRITE
delay(2);
// go through the six channels of the digital pot:
for (int channel = 0; channel < 6; channel++) {
//int channel = 0;
// for (int channel = 0; channel < 2; channel++) {
// change the resistance on this channel from min to max:
for (int level = 0; level < 255; level++) {
digitalPotWrite(channel, level);
delay(10);
}
// wait a second at the top:
delay(100);
// change the resistance on this channel from max to min:
for (int level = 0; level < 255; level++) {
digitalPotWrite(channel, 255 - level);
digitalPotWrite(wiper1writeAddr, 255 - level);
digitalPotWrite(wiper0writeAddr, 255 - level);
delay(2);
digitalWrite(shutdownPin, LOW); //Turn off shutdown THIS MAKE WRITEABLE OR DISABLE THIS CAN'T WRITE
delay(2);
delay(10);
}
}
}
void digitalPotWrite(int address, int value) {
// take the SS pin low to select the chip:
digitalWrite(slaveSelectPin, LOW);
// send in the address and value via SPI:
SPI.transfer(address);
SPI.transfer(value);
// take the SS pin high to de-select the chip:
digitalWrite(slaveSelectPin, HIGH);
}
Hi,
Again just a confusing post...
--> The MCP4261 has no reset pin...
Klaus
Hi,
The source of the signal is not important, it just needs to be HIGH or LOW with valid voltage levels according darasheet.
Klaus
If you are talking about the \SHDN\ pin then the data sheet (Section 5.4) clearly shows how the pin works and it is NOT a reset in that it does not change the wiper setting value.
As to whether it needs to be a switch or driven by some external device, have a look at Section 8, and in particular Figures 8-1 and 8-2.
There really is no substitute for reading the data sheet.
What are you wanting to do that makes you ask if there is a 'reset' pin?
Susan
Then you need top look for the root cause of the overheating.The reason I want to have a reset function is the MCP becomes hot some time and the re powered make it works.