You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request for Clarification about How the Python code Logic of writing 0x80 to DSI/SDI pin 11 once in Sequence of 8 Loops to Light a Different one of 8 LEDs each Time in 10_74HC595_LED.py #3
I have a question regarding the 10_74HC595_LED,py script's line 26 where it seems to write 0x80 or 128 to the DS/SDI pin on the 74HC595 chip once every eight loops through the def_hc595_in(dat) function.
I understand that 0x80 is sent to the serial Data serial in pin on the 74HC595 chip for conversion to parallel output on the 8 pins driving the 8 LEDs, at a different position in the sequence of 0-7 (bin) for each of the eight data words in the WhichLeds list. I just cannot quite yet comprehend how that lights a different LED each time through. If you put in a 128, shift that with a positive transiton of SRCLCK/the SHCP pin via pin 13 on the GPIO, wouldn't that always light the second or the seventh LED over and over again instead of sequencing through lighting all eight LEDs, e.g. once every 8 loops, per data serial in word, in of 128 total loops. per call of the def loop() function?
The code in the 10_74HC595_LED.py function/script clearly works well and succeeds lighting each of the eight LEDs first left to right, then right to left, then repeat both over and over, How the program logic invoked with the the loop, hc595(dat) and hc595_out() functions in the 10_74HC595_LED.py script actually achieves this is still more than a bit mysterious to me.
I am hoping that anyone who understands how this code logic actually works could find the time in their busy schedule to break this bit of the program execution logic and how it interacts with the 74HC595 chip to achieve these operational results down and reply in kind with a bit of low-level clarification and detail.