Go Down

Topic: About 74HC595 Shift Register (Read 367 times) previous topic - next topic

Pancra85

Aug 17, 2012, 12:22 am Last Edit: Aug 17, 2012, 12:25 am by Pancra85 Reason: 1
On a 74HC595 Shift Register is it mandatory to use the latchPin??
On the examples it says that you need to put it LOW so the output doesnt changes while you are sending info on it.

Code: [Select]
    // take the latchPin low so
    // the LEDs don't change while you're sending in bits:
    digitalWrite(latchPin, LOW);
    // shift out the bits:
    shiftOut(dataPin, clockPin, MSBFIRST, numberToDisplay); 

    //take the latch pin high so the LEDs will light up:
    digitalWrite(latchPin, HIGH);

but what if I don't care about sending gibberish until the last byte has been sent? Could I set the latch PIN on the Shift Reg to +5v so it is always receiving data? Would that work?

Runaway Pancake

I think the RCLK, or "latch", is edge-triggered.
It doesn't have latched and unlatched states.
When it gets a low to high (transition), the shift register contents are then transferred to the output/s.

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Pancra85

Ok, so three pins is obligatory
Thanks!

Go Up