void setup(){
DDRD = 0b11111111;
DDRB = 0b111111;
DDRC = 0b11111;
}
void loop(){
static byte sec = 0, min = 0, hour = 0;
static byte sE, mE, hE;
static byte sZ, mZ, hZ;
delay(250);
sec++;
if(sec >= 60){
sec = 0;
min++;
if(min >= 60){
min = 0;
hour++;
if(hour >= 24) hour = 0;
}
}
PORTD = sec;
PORTB = min;
PORTC = hour;
}