Ok
I didn't say this but im driving 6 nixie tubes with the shift register.
Everything works so far. The Shown time is correct but everytime the 2 second digit is changing (every second...) the tubes start to flicker. I guess this is because of the bits shifting through rhe register? Im using a NEO 6M GPS Chip to get the time. This time is stored in an DS1307 RTC. I simple read out the rtc and convert the given time to the 8 bytes which i need for the shift register. While the Tube flickers the current time is displayed correctly... but all other cathodes which should be off in this moment have a very dark glowing flicker...
It's hard to describe, sorry
I'll post my code so maybe someone can help 
By the way... I used the bitWrite methode to convert my arrays into bytes. UKHeliBob came up with this and it was the easiest way for me... maybe not the best way but im new to C and arduino.
#define RXPin 3
#define TXPin 2
#define DATA 6
#define CLOCK 4
#define LATCH 5
#define BLANK 7
#define DATATWO 11
#define CLOCKTWO 10
#define LATCHTWO 8
#define BLANKTWO 9
#include <Wire.h>
#include <RTClib.h>
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
RTC_DS1307 RTC;
TinyGPSPlus gps;
SoftwareSerial gpsSerial(RXPin, TXPin);
void setup() {
Wire.begin();
RTC.begin();
Serial.begin(9600);
gpsSerial.begin(9600);
pinMode(DATA, OUTPUT); // Data is pin 11
pinMode(LATCH, OUTPUT); // Latch is pin 10, FALLING edge copies shift register to latches
pinMode(CLOCK, OUTPUT); // Clock is pin 13, FALLING edge clocks in a bit from DATA
pinMode(BLANK, OUTPUT); // BLANK (Blank) is pin 9
pinMode(DATATWO, OUTPUT); // Data is pin 11
pinMode(LATCHTWO, OUTPUT); // Latch is pin 10, FALLING edge copies shift register to latches
pinMode(CLOCKTWO, OUTPUT); // Clock is pin 13, FALLING edge clocks in a bit from DATA
pinMode(BLANKTWO, OUTPUT); // BLANK (Blank) is pin 9
if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
RTC.adjust(DateTime(F(DATE), F(TIME)));
}
}
void loop() {
displayClock();
}
void displayClock() {
DateTime now = RTC.now();
int GMT_OFFSET = 2; //ADD BUTTON HERE
int hours = now.hour() + GMT_OFFSET;
int hourone = hours /10;
int hourtwo = hours %10 ;
int minuteone = now.minute() /10;
int minutetwo = now.minute() %10;
int secondone = now.second() /10;
int secondtwo = now.second() %10;
int colonOneUp = 1;
int colonOneDown = 1;
int colonTwoUp = 1;
int colonTwoDown = 1;
int shiftone[10] = {1,1,1,1,1,1,1,1,1,1};
shiftone[9-secondtwo] = 0;
int shifttwo[10] = {1,1,1,1,1,1,1,1,1,1};
shifttwo[9-secondone] = 0;
int shiftthree[10] = {1,1,1,1,1,1,1,1,1,1};
shiftthree[9-minutetwo] = 0;
int shiftfour[10] = {1,1,1,1,1,1,1,1,1,1};
shiftfour[9-minuteone] = 0;
int shiftfive[10] = {1,1,1,1,1,1,1,1,1,1};
shiftfive[9-hourtwo] = 0;
int shiftsix[10] = {1,1,1,1,1,1,1,1,1,1};
shiftsix[9-hourone] = 0;
int shiftoutone[32] = {colonOneUp,colonOneDown,shiftsix[0],shiftsix[1],shiftsix[2],shiftsix[3],shiftsix[4],shiftsix[5],shiftsix[6],shiftsix[7],shiftsix[8],shiftsix[9],shiftfive[0],shiftfive[1],shiftfive[2],shiftfive[3],shiftfive[4],shiftfive[5],shiftfive[6],shiftfive[7],shiftfive[8],shiftfive[9],shiftfour[0],shiftfour[1],shiftfour[2],shiftfour[3],shiftfour[4],shiftfour[5],shiftfour[6],shiftfour[7],shiftfour[8],shiftfour[9]};
int shiftouttwo[32] = {colonTwoUp,colonTwoDown,shiftthree[0],shiftthree[1],shiftthree[2],shiftthree[3],shiftthree[4],shiftthree[5],shiftthree[6],shiftthree[7],shiftthree[8],shiftthree[9],shifttwo[0],shifttwo[1],shifttwo[2],shifttwo[3],shifttwo[4],shifttwo[5],shifttwo[6],shifttwo[7],shifttwo[8],shifttwo[9],shiftone[0],shiftone[1],shiftone[2],shiftone[3],shiftone[4],shiftone[5],shiftone[6],shiftone[7],shiftone[8],shiftone[9]};
byte sone = 0b11111111;
bitWrite(sone, 0, shiftouttwo[31]);
bitWrite(sone, 1, shiftouttwo[30]);
bitWrite(sone, 2, shiftouttwo[29]);
bitWrite(sone, 3, shiftouttwo[28]);
bitWrite(sone, 4, shiftouttwo[27]);
bitWrite(sone, 5, shiftouttwo[26]);
bitWrite(sone, 6, shiftouttwo[25]);
bitWrite(sone, 7, shiftouttwo[24]);
byte stwo = 0b11111111;
bitWrite(stwo, 0, shiftouttwo[23]);
bitWrite(stwo, 1, shiftouttwo[22]);
bitWrite(stwo, 2, shiftouttwo[21]);
bitWrite(stwo, 3, shiftouttwo[20]);
bitWrite(stwo, 4, shiftouttwo[19]);
bitWrite(stwo, 5, shiftouttwo[18]);
bitWrite(stwo, 6, shiftouttwo[17]);
bitWrite(stwo, 7, shiftouttwo[16]);
byte sthree = 0b11111111;
bitWrite(sthree, 0, shiftouttwo[15]);
bitWrite(sthree, 1, shiftouttwo[14]);
bitWrite(sthree, 2, shiftouttwo[13]);
bitWrite(sthree, 3, shiftouttwo[12]);
bitWrite(sthree, 4, shiftouttwo[11]);
bitWrite(sthree, 5, shiftouttwo[10]);
bitWrite(sthree, 6, shiftouttwo[9]);
bitWrite(sthree, 7, shiftouttwo[8]);
byte sfour = 0b11111111;
bitWrite(sfour, 0, shiftouttwo[7]);
bitWrite(sfour, 1, shiftouttwo[6]);
bitWrite(sfour, 2, shiftouttwo[5]);
bitWrite(sfour, 3, shiftouttwo[4]);
bitWrite(sfour, 4, shiftouttwo[3]);
bitWrite(sfour, 5, shiftouttwo[2]);
bitWrite(sfour, 6, shiftouttwo[1]);
bitWrite(sfour, 7, shiftouttwo[0]);
byte sfive = 0b11111111;
bitWrite(sfive, 0, shiftoutone[31]);
bitWrite(sfive, 1, shiftoutone[30]);
bitWrite(sfive, 2, shiftoutone[29]);
bitWrite(sfive, 3, shiftoutone[28]);
bitWrite(sfive, 4, shiftoutone[27]);
bitWrite(sfive, 5, shiftoutone[26]);
bitWrite(sfive, 6, shiftoutone[25]);
bitWrite(sfive, 7, shiftoutone[24]);
byte ssix = 0b11111111;
bitWrite(ssix, 0, shiftoutone[23]);
bitWrite(ssix, 1, shiftoutone[22]);
bitWrite(ssix, 2, shiftoutone[21]);
bitWrite(ssix, 3, shiftoutone[20]);
bitWrite(ssix, 4, shiftoutone[19]);
bitWrite(ssix, 5, shiftoutone[18]);
bitWrite(ssix, 6, shiftoutone[17]);
bitWrite(ssix, 7, shiftoutone[16]);
byte sseven = 0b11111111;
bitWrite(sseven, 0, shiftoutone[15]);
bitWrite(sseven, 1, shiftoutone[14]);
bitWrite(sseven, 2, shiftoutone[13]);
bitWrite(sseven, 3, shiftoutone[12]);
bitWrite(sseven, 4, shiftoutone[11]);
bitWrite(sseven, 5, shiftoutone[10]);
bitWrite(sseven, 6, shiftoutone[9]);
bitWrite(sseven, 7, shiftoutone[8]);
byte seight = 0b11111111;
bitWrite(seight, 0, shiftoutone[7]);
bitWrite(seight, 1, shiftoutone[6]);
bitWrite(seight, 2, shiftoutone[5]);
bitWrite(seight, 3, shiftoutone[4]);
bitWrite(seight, 4, shiftoutone[3]);
bitWrite(seight, 5, shiftoutone[2]);
bitWrite(seight, 6, shiftoutone[1]);
bitWrite(seight, 7, shiftoutone[0]);
digitalWrite(BLANK, LOW);
digitalWrite(BLANK, HIGH);
digitalWrite(BLANKTWO, LOW);
digitalWrite(BLANKTWO, HIGH);
shiftOut(DATA, CLOCK, MSBFIRST, sfour); //Byte erste 0 wird weggekürzt flackern?
shiftOut(DATA, CLOCK, MSBFIRST, sthree);
shiftOut(DATA, CLOCK, MSBFIRST, stwo);
shiftOut(DATA, CLOCK, MSBFIRST, sone);
shiftOut(DATATWO, CLOCKTWO, MSBFIRST, seight); //Byte erste 0 wird weggekürzt flackern?
shiftOut(DATATWO, CLOCKTWO, MSBFIRST, sseven);
shiftOut(DATATWO, CLOCKTWO, MSBFIRST, ssix);
shiftOut(DATATWO, CLOCKTWO, MSBFIRST, sfive);
digitalWrite(LATCH, LOW);
digitalWrite(LATCHTWO, LOW);
digitalWrite(LATCH, HIGH);
digitalWrite(LATCHTWO, HIGH);
updateTime();
}
void updateTime() {
while (gpsSerial.available() > 0) {
if (gps.encode(gpsSerial.read())) {
DateTime now = RTC.now();
RTC.adjust(DateTime(gps.date.year(),gps.date.month(),gps.date.day(),gps.time.hour(),gps.time.minute(),gps.time.second()));
/*
if (gps.date.isValid()) {
if (gps.date.day() < 10) Serial.print(F("0"));
Serial.print(gps.date.day());
Serial.print("/");
if (gps.date.month() < 10) Serial.print(F("0"));
Serial.print(gps.date.month());
Serial.print("/");
Serial.println(gps.date.year());
} else {
Serial.println("Not Available");
}
if (gps.time.isValid()) {
int currenthour = gps.time.hour() + 2;
if (currenthour < 10) Serial.print(F("0"));
Serial.print(currenthour);
Serial.print(":");
if (gps.time.minute() < 10) Serial.print(F("0"));
Serial.print(gps.time.minute());
Serial.print(":");
if (gps.time.second() < 10) Serial.print(F("0"));
Serial.print(gps.time.second());
} else {
Serial.println("Not Available");
}
Serial.println();
*/
}
}
}