it shifts me one byte.. why one? .. shouldn't it light me up LED1, LED2, LED3 and LED4 ?
second question.. about reset-pin of the IC:
..when I now execute the code once more, it like shifts the one LED into the chain.. so do I understand it correctly, that if I want to display various states on demand, I would have to
No it is not. It is a physical layout diagram, it is a bit useless for telling if you have the correct wires.
Also you have:-
No resistors on your LEDs - that is going to burn something, maybe that is why it is not working.
No supply decoupling on that shift register chip. - You NEED a 0.1uF ceramic capacitor between the power and ground of that chip as close to the chip as possible with the capacitor's leads cut as short as possible.
thank you for the link. I have wired it like you said, but still with same result
I do:
void loop(){
  digitalWrite(SHCP_pin, LOW);Â
  shiftOut(DS_pin, STCP_pin, MSBFIRST, 0b00000001);
  digitalWrite(SHCP_pin, HIGH);Â
 Â
  delay(500);
Â
  digitalWrite(SHCP_pin, LOW);Â
  shiftOut(DS_pin, STCP_pin, MSBFIRST, 0b00000000);
  digitalWrite(SHCP_pin, HIGH);
 Â
  delay(500);Â
}
Mike, I'm pretty sure you are correct: 595 latches on the rising edge. Found this out recently when using one to drive the D0-D7 inputs of a ks0108 display. It's Enable pin latches, very conveniently, on the falling edge, so I was able to use the same Arduino pin for both purposes.
now that the standard shiftOut() is working.. i try to find out, why shiftPWM is not working correctly..
when I do a:
shiftPWM(0,100,0,0);
..it should light me up the first LED in slight red.. correct?
but it lights me up the first LED in red.. and the second LED in green(?)
also when I do
void setup() {
 Serial.begin(9600);
 ShiftPWM.SetAmountOfRegisters(3);
 ShiftPWM.SetPinGrouping(8);
 ShiftPWM.Start(75, 255);Â
}
void loop() {
  ShiftPWM.SetAll(0);
  delay(500);
 Â
  ShiftPWM.SetRGB(0,100,0,0);
  delay(500);
 Â
  ShiftPWM.SetRGB(0,0,100,0);Â
  delay(500);
 Â
  ShiftPWM.SetRGB(0,0,0,100);
  delay(500);
}
Are you sure you have not mixed up the clock and latch pin like you did in the software shift out case?
Note that you need to use specific pins for this libiary, you can't fix things in software. So you need to show us how you have wired your shift registers.
Grumpy_Mike:
Are you sure you have not mixed up the clock and latch pin like you did in the software shift out case?
I have tried swapping the pins.. but
Grumpy_Mike:
Note that you need to use specific pins for this libiary, you can't fix things in software. So you need to show us how you have wired your shift registers.
oh.. okay.. I need to try that out.
maybe for my understanding.. why do I have to use the pre-configured pins? i mean, i do not use SPI(?)
You might not but the shiftPWM libiary does. Look at the example program and you will see that it has a couple of lines at the start saying what pins you should use with what models of Arduino.
It says:-
// Clock and data pins are pins from the hardware SPI, you cannot choose them yourself if you use the hardware SPI.
// Data pin is MOSI (Uno and earlier: 11, Leonardo: ICSP 4, Mega: 51, Teensy 2.0: 2, Teensy 2.0++: 22)
// Clock pin is SCK (Uno and earlier: 13, Leonardo: ICSP 3, Mega: 52, Teensy 2.0: 1, Teensy 2.0++: 21)