Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MCP4261 need manually power off from time to time or not working well

Status
Not open for further replies.

laoadam

Member level 2
Joined
Feb 22, 2019
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
324
Do you have idea why my MCP4261 need manually power off time by time, otherwise it can't be write correctly.
 

Hi,

My idea: You did something wrong... = not according the datasheet.

But we are not able to verify this, because you didn´t give any information.
* Schematic
* PCB layout
* code
* scope pictures
* test conditions
...

Klaus
 

Hi,

My idea: You did something wrong... = not according the datasheet.

But we are not able to verify this, because you didn´t give any information.
* Schematic
* PCB layout
* code
* scope pictures
* test conditions
...

Klaus

Thank Klaus,
The drawing attached here.
0_MCP_MEGA2560.JPG
 

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
 

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

Thank you.
Can you point out which pin is not correct? The drawing is what I'm using now and it is working well, just some time need be power off.
 

The CODE is here and the LEDS just on/off one time after added the shutdown function, otherwise it should be on/off cycle.
Code:
// 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);
}
 

Any comment on how to use the reset pin?
 

Hi,

Again just a confusing post...
--> The MCP4261 has no reset pin...

Klaus
 

Hi,

Again just a confusing post...
--> The MCP4261 has no reset pin...

Klaus

Thanks,
I mean the pin12 (SHDN), can this pin used by a switch or it just can be set by code?
 

Hi,

The source of the signal is not important, it just needs to be HIGH or LOW with valid voltage levels according darasheet.

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


Hardware or software. can this pin works as reset? say I switch it to 0, and then to Vcc ?
 

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
 

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


Thanks.
The reason I want to have a reset function is the MCP becomes hot some time and the re powered make it works.
 

Hi,

My recommendation:
Replace the cause, not the symptom.

I think you have a good reason not to provide all the requested informations of post#2. You already know the reason, don't you? ;-)

Klaus
 

The reason I want to have a reset function is the MCP becomes hot some time and the re powered make it works.
Then you need top look for the root cause of the overheating.
Look for things such as drawing too much power from an output pin, or the supply voltage going high, or a damaged MCU. (This is certainly NOT an exhaustive list!)
Susan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top