// connect 8 leds to port A its row 1
// CONNECT 8 leds to port B its row 2 blink 1st row led alternatrively 2nd row
#include <stdint.h>
#define DDRA (*(volatile uint8_t*)0x21)
#define PORTA (*(volatile uint8_t*)0x22)
#define DDRB (*(volatile uint8_t*)0x24)
#define PORTB (*(volatile uint8_t*)0x25)
void delay1sec(void){
TCNT1 = 0;
TCCR1A = 0x00;
TCCR1B = 0x05;
while (TCNT1 < 15625);
TCCR1B = 0x00;
}
void setup() {
DDRA = 0xFF;
DDRB = 0xFF;
}
void loop() {
PORTA = 0xFF;
PORTB = 0x00;
delay1sec();
PORTA = 0x00;
PORTB = 0xFF;
delay1sec();
}