chenillard.c 272 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <avr/io.h> // for the input/output register #include <util/delay.h> #include <stdio.h> int main(void) { DDRB = 0xFF; PORTB = 0x01; while(1) { _delay_ms(400); PORTB = PORTB*2; if(PORTB == 0x40) PORTB = 0x01; } }