/* * zadanie3.c * * Created: 22.10.2015 11:45:17 * Author: d14valicek */ #define F_CPU 1000000UL #include #include int main(void) { DDRD = 0xFF; while(1) { for(int c = 1; c <= 256; c=(c*2)) { int a = c - 1; PORTD =~a; _delay_ms(500); } for(int c = 256; c >= 1; c=(c/2)) { int a = c - 1; PORTD = ~a; _delay_ms(500); } } return 0; }