Hello there. I have set up a 595 attached to my Arduino clone MC-NOVE board, as shown in the shiftout tutorial.
The basic process certainly works, but for some reason Q0 either doesnt light up or takes a long time to light up, and Q7 only comes on when I put my logic probe on 595 pin 7. Looks like some kind of buffer problem maybe?. When I run the second example with the serial read, entering a zero does nothing for a few seconds, then lights up flakily at first, then stays on eventually.
This is for a level indicator where I want LEDs “on” up to the current level. I have done it just using 8 digital outputs from the board and it works fine, but I need to free up inputs for other processes. This is my circuit to test the setup:
//Shiftout level indicator
//variables
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int levelArray = {1, 3, 7, 15, 31,63, 127, 255};
void setup() {
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
for (int j = 0; j < 8; j++) {
Serial.println(levelArray[j]);
//for debug - the numbers all print in sequence
// Latch low / shiftout /latch high
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST,levelArray[j]); //
digitalWrite(latchPin, HIGH);
delay(1000);
}
}
I am driving an LED bargraph using a 390R resistor array.
I am a bit new to this, I’ve only had my board for a few days. Fortunately I know C++ moderately well.
Any clues
Thanks