//connect 8 leds to port F blink 4-7 leds one by one
#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 (uint8_t i = 4; i < 8; i++) {
PORTF = (1 << i);
delay1sec();
PORTF = 0x00;
delay1sec();
}
}