Hi everyone.
I recently set up a simple layout with two 595s that drive two 8-segment LED displays. For reference, it's basically this but with segment LEDs (showing this to reference how the 595s are connected to each other):
Worth noting that I have 10uF capacitor on the PWR/GND rails and 0.1uFs for each IC.
Now, the code and everything works perfectly fine with my Arduino Nano RP2040 Connect. No issues at all and I can't stress this enough.
However, if I replace that with an Arduino Nano Every all hell breaks loose and the displays just contain random assorted leds (both of them do). They however do still refresh to be the same gibberish on every loop.
Now the weird part is that if I disconnect the nano clock
connection from the second 595, the first segment display goes back to displaying the proper digits (while the second LED display is naturally empty off)
I know these two Nanos use different microcontrollers and compile the software differently. The digital outs also have different voltages (595 VCC is 3.3V in both cases but the digital out is 3.3V with the 2040 and 5V with the Every) but this is still throwing me for a loop.
Here's how I'm pushing data to the ICs:
while(number){
shiftOut(serialData, clock, LSBFIRST, number);
delay(timedelay);
number = (number >> 8);
}
digitalWrite(latch, HIGH);
delay(timedelay);
digitalWrite(latch, LOW);
delay(timedelay);
number
takes the form of uint16_t
right now since I only have two displays but it could be made larger (ex: 0b0101010111001000
)
I've also tried changing the timedelay
value on the offchance I needed to slow things down. Didn't change anything (tried 10 to 100). I also tried another Nano Every to make sure the one I had wasn't faulty.. same result.
Does shiftOut()
behave differently in these microcontrollers? Am I running into some weird noise happening in the system? I tried 10k pull-down resistors on all the actuating IC pins but that hasn't fixed anything.
I'm at a loss, any ideas?