byte MaskB;
void setup(){
MaskB = 0b000001;
DDRB = MaskB;
}
void loop(){
static byte sec = 0, min = 0, hour = 0;
sec++;
delay(1000);
if(sec >= 59) {
sec = 0;
min++;
if(min >= 59){
min = 0;
hour++;
if(hour >=24) hour = 0;
}
}
/*
if(PORTB &(1<<PB0))
PORTB &= ~(1<<PB0);
else
PORTB |= (1<<PB0);
*/
PORTB = sec;
}