How to Control 1 Output at a time with ShiftRegister

I'm trying to control 1 output at a time with a 74hc595 shift register, How can I do that?

For example how can I HIGH/LOW Q1 on shift register?

My clockPin is 8,dataPin is 4, latchPin is 7.

Thank you!

You must store the bits in you code - one byte for each shift register. When you want to change one bit (ie Q1) - change that bit and update the shift register again.

The way I do it is keep a variable with the code I want on the shift register. I can then use the bit instructions or others to set or clear any bit or bits I want. I then just shift it out and when I latch it only the changes appear on the outputs, the others remain the same. You can set that variable to your default and in setup send it to the shift register, from then on it will be correct.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.