Saturday, June 1, 2013

Is it possible to burn out a shift register?

In a previous post, I showed a wiring diagram and schematics for a "simple" four led (because that's all I have) project. I borrowed some code, loaded it and downloaded it to my Arduino powered circuit. Here's the code:

int dataPin = 10;        //Define which pins will be used for the Shift Register control
int latchPin = 9;
int clockPin = 8;

int counter = 0;       //The counter for storing the byte value

void setup()
{
    pinMode(dataPin, OUTPUT);       //Configure each IO Pin
    pinMode(latchPin, OUTPUT);
    pinMode(clockPin, OUTPUT);
}

void loop()
{
    for (counter = 0; counter < 15; counter++)
    {
        digitalWrite(latchPin, LOW);          //Pull latch LOW to start sending data
        shiftOut(dataPin, clockPin, MSBFIRST, counter);         //Send the data
        digitalWrite(latchPin, HIGH);         //Pull latch HIGH to stop sending data
        delay(500);
    }
}

When the code compiled, I watched the code download, all 4 LEDs lit, pulsing. This was supposed to be a binary counter. Soon, I smelled an odor. Quickly, I unplugged everything, sniffed my boards and found the smell coming from the shift register chip. Yes, it was very hot.

What'd I do wrong?

Is it the circuit? The code? The "dirt cheap" chips I bought from ebay?

1 comment :

  1. I note that in your diagram that you'd not connected Vcc to your source. This can cause some strange behaviour - although normally in CMOS and not TTL.

    In short - if your logic pins go over the Vcc voltage, then artifacts of the manufacturing or design of the chip could start to behave in odd ways and create a short circuit.

    This explains it far better than I could - http://www.youtube.com/watch?v=S0TZMivVzVk.

    ReplyDelete