Declaring the encoder inputs didn't change a thing.
But I guess i'm a little bit further now.
It must be definitly in the code. I thought that in actual fact i could try to understand what happens, if I read it out with the serial output.
Therefore I inserted two extra lines:
// Anzeigenausgabe
digitalWrite(latch, 0);
shiftOut(data, clock, MSBFIRST, kanaele_einer[x]);
[color=red]Serial.println(kanaele_einer[x]);[/color]
shiftOut(data, clock, MSBFIRST, kanaele_zehner[x]);
[color=red] Serial.println(kanaele_zehner[x]);[/color]
digitalWrite(latch, 1);
}
And now the strange thing happens: My serial output nearly oberflows. I get bombed with messages although I do not rotate the encoder at all. It can't be a bouncing problem, as the problem stays if I even remove the encoder from the wiring.
It seems as if the program doesnt' stop writing (at the moment 91 and 63) ton the shift register.
Is it possible that the program in the way i set it up doesn't wait for a change to write new numbers, but instead rewrites the old ones all the time?