Hi, I just got my first shift registers and am learning how to use them. I found this site- http://bildr.org/2011/08/74hc595-breakout-arduino/ There was a great library there that made it easier to use this shift register and I am using it now. The only problem is that I can't individually control pin 8. The pin works fine and responds normally when using
shifter.setAll(HIGH);
shifter.write();
delay(500);
but when I use
shifter.setPin(8, HIGH);
shifter.write();
delay(500);
the pin does nothing.
Can anyone help me with this problem and tell me what I am doing wrong? Any help would be appreciated.
This is a rather lengthy sketch that I wrote to test out this problem-
#include <Shifter.h>
#define SER_Pin 4 //SER_IN
#define RCLK_Pin 5 //L_CLOCK
#define SRCLK_Pin 6 //CLOCK
#define NUM_REGISTERS 1 //how many registers are in the chain
//initaize shifter using the Shifter library
Shifter shifter(SER_Pin, RCLK_Pin, SRCLK_Pin, NUM_REGISTERS);
void setup(){
shifter.clear();
shifter.write();
delay(100);
}
void loop(){
shifter.setPin(1, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setPin(2, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setPin(3, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setPin(4, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setPin(5, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setPin(6, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setPin(7, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setPin(8, HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
shifter.setAll(HIGH);
shifter.write();
delay(500);
shifter.clear();
shifter.write();
delay(100);
}