//connect 8 leds to port f and blink them form 3 to 0
#include <stdint.h>
#define DDRF (*(volatile uint8_t*)0x30)
#define PORTF (*(volatile uint8_t*)0x31)
void delay1sec(void){
TCNT1 = 0;
TCCR1A = 0x00;
TCCR1B = 0x05;
while (TCNT1 < 15625);
TCCR1B = 0x00;
}
void setup() {
DDRF |= (1<<4) | (1<<5) | (1<<6) | (1<<7);
}
void loop() {
for (int8_t i = 7; i >= 4; i--) {
PORTF = (1 << i);
delay1sec();
PORTF = 0x00;
delay1sec();
}
}