//connect 8 leds to port A blink them all
#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() {
// put your setup code here, to run once:
DDRC |= (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7);
}
void loop() {
// put your main code here, to run repeatedly:
for(int i = 0 ; i <8 ; i++){
PORTC |= (1<<i);
delay1sec();
PORTC &= ~((1<<i));
delay1sec();
}
}