void setup() {
}
void loop() {
delay(1000);
int seconds = 0;
int minutes = 0;
int hours = 0;
seconds++;
if(seconds == 60){
seconds = 0;
minutes++;
if(minutes == 60){
minutes = 0;
hours++;
if(hours == 24){
hours = 0;
}
}
}
PORTD = (seconds/10) << 4 + seconds%10 + (minutes%2) << 7;
PORTC = (hours/10) << 4 | (hours%10);
PORTB = (minutes/10) << 3 | (minutes%10) >> 1;
}