there are some things not so correct.
first: the 595 can only supply around 90ma total, so max 3 pins can reach the 35ma.
since you use 8 it gets split over all (like 10ma per pin) - its not healthy for the ic todo that.
than: you open and dispose the output ports, dont do that. let them open the whole time.
also, whats your main loop doing? if it ends it may give odd results.
and why are you bitbanging spi? (and in a even strange way ...)
use hardware spi, its way faster. and dynamic
connect it like that:
https://netmftoolbox...pported devices
in the link in my sig is a good multispi class, and ill add my 74hc595 drivers.
use it like: IC74HC595 hc = IC74HC595(latch, SPIModule-1-or-whatever-you-wanna-use);
hc.WriteData(0xFF); // turn all leds on
hc.WriteData(0x00); // turn all leds off
edit: btw, that circ-05 used 350ohm resistors, on the cathode side (negative) and the leds are connected with anode (positive) to the 595's - thats the way id do it also, ou should also do it like that, not 2 resistors and get the correct value.
Thanks a lot NooM!!!
Basically, I'd understood that each single pin from 74HC595N could emit max 35mA but I didn't notice about max output for the shift register (80mA Max according with the datasheet).
Regarding to your question about why I'm opening and disposing ports in this way. This is not the final program. It's just a test about how to add all bits into the shift register.
I'll try using 330 ohm resistors to build the same circuit and check the output for each pin.
I've another doubt...because you're recommend me use SPI ports, where can I find what advantages has use SPI instead regular output ports?
Kind regards