//connect 8 led to port c blink one by one
#include <stdint.h>
#define DDRC (*(volatile uint8_t*)0x27)
#define PORTC (*(volatile uint8_t*)0x28)
void delay1sec(void){
TCNT1 = 0;
TCCR1A = 0x00;
TCCR1B = 0x05;
while (TCNT1 < 15625);
TCCR1B = 0x00;
}
void setup() {
DDRC = 0xFF;
}
void loop() {
for (uint8_t i = 0; i < 8; i++) {
PORTC = (1 << i);
delay1sec();
PORTC = 0x00;
delay1sec();
}
}