// pattern 34, 567, 012
#include <stdint.h>
#define DDRA (*(volatile uint8_t*)0x21)
#define PORTA (*(volatile uint8_t*)0x22)
uint8_t pattern[3] = {
0x18, // 34
0xE0, // 567
0x07 // 012
};
void delay1sec(void){
TCNT1 = 0;
TCCR1A = 0x00;
TCCR1B = 0x05;
while (TCNT1 < 15625);
TCCR1B = 0x00;
}
void setup() {
DDRA = 0xFF;
}
void loop() {
for (uint8_t i = 0; i < 3; i++) {
PORTA = pattern[i];
delay1sec();
PORTA = 0x00;
delay1sec();
}
}