i can only light LEDs by series ? which means 1, 2, 3, 4 but every LED will light on it’s own ?
If you have LED’s connected to output pins 7,6,5,4,3,2,1,and 0 and you want to turn on 4 and 7 you would send a pattern of:
Let’s say that LEDs 3 and 2 are already lit (00001100).
As you shift the new pattern into the shift register the LEDs will be lit in the following patterns:
The end result is what you want but along the way some of the other LEDs will be briefly lit. If you use a relatively slow shifting method (like shiftOut()) the ghosting will be worse than if you use a very fast method (SPI can clock out bits at 8 million per second).
about A and B i just put for example A HIGH and use B as an output that’s what you mean ?
Yes. Connect A to +5 and connect B to your Data pin, or connect B to +5 and connect A to your Data pin, or connect both to your Data pin.