I tweaked it a little, try this.
You had a couple of } in the wrong place, think it was messing the logic up a little, thats why I think you had 4 at the end.
Next edit, use the Tools:Autoformat key, it can help you spot things like that, while the compiler may not necessarily complain.
You are shifting out 3 times, that may be slowing things down a little as well. Try taking the first 2 sets out.
unsigned long currentmillis = 0;
unsigned long previousmillis = 0;
unsigned long interval = 10;
int latchpin = 8; // connect to pin 12 on the 74HC595
int clockpin = 12; // connect to pin 11 on the 74HC595
int datapin = 11; // connect to pin 14 on the 74HC595
float b = 0;
int c = 0;
float d = 0;
int e = 0;
float f = 0;
int g = 0;
float h = 0;
int i = 0;
float j = 0;
int k = 0;
float l = 0;
int m = 0;
int hundredths1;
int seconds;
int minutes;
int hundredths;
[glow]int segdisp[10] = {
63,6,91,79,102,109,125,7,127,111 }; //segment references using 74HC595 Shift Registers
// not really sure what this is, I did not mess with it[/glow]
[glow]int time_update = 0;// added new flag[/glow]
void setup()
{
pinMode(latchpin, OUTPUT);
pinMode(clockpin, OUTPUT);
pinMode(datapin, OUTPUT);
}
void loop()
{
currentmillis = millis(); // read the time.
if (currentmillis - previousmillis >= interval) // 10 milliseconds have gone by
{
previousmillis = currentmillis; // save the time for the next comparison
hundredths = hundredths +1;
[glow][glow]time_update = 1;[/glow] } // set flag to upate & shift out[/glow]
[glow] if (time_update == 1){ // no updating if not at 10ms interval, skip this whole section
// increment the counters, roll as needed, shift the digits out
time_update = 0; // reset for next pass thru[/glow]
digitalWrite(latchpin, LOW);
[glow]// why do this? I would think it would just make the display look flickery,
// going between 0 & a real number each update. Maybe put a copy of this in void setup() to clear the displays to start the program[/glow]
shiftOut(datapin, clockpin, MSBFIRST, 0); // clears the left display
shiftOut(datapin, clockpin, MSBFIRST, 0); // clears the left display
shiftOut(datapin, clockpin, MSBFIRST, 0); // clears the left display
shiftOut(datapin, clockpin, MSBFIRST, 0); // clears the left display
shiftOut(datapin, clockpin, MSBFIRST, 0); // clears the left display
shiftOut(datapin, clockpin, MSBFIRST, 0); // clears the left display
digitalWrite(latchpin, HIGH);
if (hundredths<1)
{
digitalWrite(latchpin, LOW);
[glow]// why do this again? I would think it would just make the display look flickery,
// going between 0 & a real number each update[/glow]
shiftOut(datapin, clockpin, MSBFIRST, segdisp[hundredths]); // sends the digit down the serial path
shiftOut(datapin, clockpin, MSBFIRST, 0); // sends a blank down the serial path to push the digit to the right
shiftOut(datapin, clockpin, MSBFIRST, 0); // sends a blank down the serial path to push the digit to the right
shiftOut(datapin, clockpin, MSBFIRST, 0); // sends a blank down the serial path to push the digit to the right
digitalWrite(latchpin, HIGH);
}
else if (hundredths>=1)
//------------------------------ Hundredths below
{
d=hundredths%10; // find the remainder of dividing hundredths by 10, this will be the right-hand digit
c=int(d); // make it an integer, c is the right hand digit
b=hundredths/10; // divide hundredths by 10 - the whole number value will be the left-hand digit
e = int(b); // e is the left hand digit
}
//------------------------------ Ten of Seconds (60) below
if( hundredths == 100) {
c=0; // clear the hundredths digit
e=0; // clear the hundredths digit
hundredths=0; // reset the timer
seconds++; // add 1 second to "seconds"
f=seconds%10; // float the %
g=int (f); // print the % first "seconds" digit
h=seconds/10; // divide the seconds by 10 to get the tens of seconds
i = int (h); // print the tens of seconds digit
}
//------------------------------ Minutes (60) below
if( seconds == 60) {
g=0; // clear the "seconds" digit
i=0; // clear the "tens" of seconds digit
seconds=0; // reset the seconds
minutes++; // add 1 minute to "minutes"
j=minutes%10; // float the %
k=int (j); // print the % first "minute" digit
l=minutes/10; // divid the minutes by 10 to get the tens of minutes
m = int (l); // print the tens of minutes digit
}
//------------------------------
if( minutes == 60) {
k=0; // clear the "minutes" digit
m=0; // clear the "tens" of minutes digit
minutes=0; // reset the minutes
}
[glow]// counters are all updated now, just do the shiftout one time here:[/glow]
digitalWrite(latchpin, LOW); // send the digits down to the shift registers!
shiftOut(datapin, clockpin, MSBFIRST, segdisp[c]); // print the % first "hundredths" digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[e]); // print the tens of hundredths digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[g]); // print the % first "seconds" digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[i]); // print the tens of seconds digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[k]); // print the % first "minute" digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[m]); // print the tens of minutes digit
digitalWrite(latchpin, HIGH);
} // end if time to be updated
} // end void loop