OpenSprinkler Forums OpenSprinkler Unified Firmware Need positive logic from the 74HC595 output Reply To: Need positive logic from the 74HC595 output

#39145

mikek
Participant

@David,

Yes it works.


@Ray
,

I put a if else in the code to only effect the single serial data pin going to the shift register (pin 27 on the Pi)

if (pin == 27) {
modified code
}
else {
unmodified code
}

As for reversing the logic on the input it will have (and does have) the same effect as reversing the output since the LSB of the input is the Q0 output and all the way to the MSB on the input is Q7 on the output.

My solution works, however, I agree that it would be better and cleaner to change the apply_all_station_bits as you suggested. I was looking where Samer suggested.