74hc595 Shift Register Help
MR
Posts: 46
Please Review my code and make corrections. I am trying to become more proficient at programming.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
They say if you Play a Microsoft CD backwards you can hear satanic messages, that's nothing because if you play it forward it installs Windows!
I didn't Fail 10,000 times, I simply found 10,000 ways that didn't work. -Thomas Edison
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
They say if you Play a Microsoft CD backwards you can hear satanic messages, that's nothing because if you play it forward it installs Windows!
I didn't Fail 10,000 times, I simply found 10,000 ways that didn't work. -Thomas Edison
bsp
4K
Comments
You would save about 80 bytes of program memory space (based on your attached code).
patt1 var byte
patt2 var byte
AUXIO
DIRS=Dears
OUTS=A
MAINIO
patt1=%11111001
patt2=%11111111
GOSUB Shiftproc
Shiftproc:
SHIFTOUT DataOut, Clock, MSBFIRST, [noparse][[/noparse]patt1]
SHIFTOUT DataOut, Clock, MSBFIRST, [noparse][[/noparse]patt2]
PULSOUT Latch, 5 ' latch outputs
PAUSE Hold
GOSUB clear
RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."