How to efficiently push a 1 (bit) across a 74HC595 shift register
i've got question shift registers , trick had in mind isn't panning out thought would.
i have led matrix i'm driving anode columns high 1 @ time , sinking cathodes every time. can traditional way , refresh anode shift registers every time seems redundant since i'm doing pushing 1 (high) across pins every new loop. since shift register rather @ doing (pulse sh_cp clock pin 11 high , low), figured should super efficient enter high bit @ start of line , clock down every loop while keeping counter can know when 1 high bit have reached end.
two things went differently had expected, , of 2 there's 1 had me puzzled.
the first easy one: put single 1 in de data line, clocked in , put latch high, entering output pins. clocked through. didn't happen single led going pin 1, 2, 3, 4 etc. (like knight rider thing) every consecutive led turned on, first led 1, led 1 , 2, 1, 2, , 3, etc. made sense, because moving 1, without 1 in previous position being changed. so, shifted 1 data line, clocked in, , 0. worked! when clocking, 1 moved along, , trailing 0 well, changing previous 1 0 while doing so. great success. me happy.
i though trivial apply daisy chaining, i.e. shift 1 , 0 across multiple shift registers clocking but... doesn't work! can't explain why, start clocking (ie not shifting out data), second shift register show identical data first one. let me explain through numbers:
apparently i'm missing in way shift registers work. why isn't idea working? possible @ all? make things more efficient.
i have led matrix i'm driving anode columns high 1 @ time , sinking cathodes every time. can traditional way , refresh anode shift registers every time seems redundant since i'm doing pushing 1 (high) across pins every new loop. since shift register rather @ doing (pulse sh_cp clock pin 11 high , low), figured should super efficient enter high bit @ start of line , clock down every loop while keeping counter can know when 1 high bit have reached end.
two things went differently had expected, , of 2 there's 1 had me puzzled.
the first easy one: put single 1 in de data line, clocked in , put latch high, entering output pins. clocked through. didn't happen single led going pin 1, 2, 3, 4 etc. (like knight rider thing) every consecutive led turned on, first led 1, led 1 , 2, 1, 2, , 3, etc. made sense, because moving 1, without 1 in previous position being changed. so, shifted 1 data line, clocked in, , 0. worked! when clocking, 1 moved along, , trailing 0 well, changing previous 1 0 while doing so. great success. me happy.
i though trivial apply daisy chaining, i.e. shift 1 , 0 across multiple shift registers clocking but... doesn't work! can't explain why, start clocking (ie not shifting out data), second shift register show identical data first one. let me explain through numbers:
code: [select]
begin state. 2 shift registers, shifting in data right:
00000000 00000000
i shift in 1...
00000000 00000001
... , 0
00000000 00000010
.. , latch it. bit sequence set output pins.
i don't shift out new data putch clock high , low again,
also latching in between (to update new position of bits
output pins). expect this:
00000000 00000100
but instead happens:
00000100 00000100
another latch low, clock high, clock low, latch high, , then:
00001000 00001000
in way logical, why did second shift register 1 in there in first place!?
apparently i'm missing in way shift registers work. why isn't idea working? possible @ all? make things more efficient.
how shift registers wired?
Arduino Forum > Using Arduino > LEDs and Multiplexing > How to efficiently push a 1 (bit) across a 74HC595 shift register
arduino
Comments
Post a Comment