blob: e475624ce4d27b74a1eee49057f9e7c1706a27af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include <avr/io.h>
#include <util/delay.h>
int
main (void)
{
DDRB |= _BV(DDB0);
DDRB |= _BV(DDB1);
DDRB |= _BV(DDB2);
DDRB |= _BV(DDB3);
DDRB |= _BV(DDB4);
while(1) {
PORTB ^= _BV(PB0);
_delay_ms(500);
PORTB ^= _BV(PB0);
PORTB ^= _BV(PB1);
_delay_ms(500);
PORTB ^= _BV(PB1);
PORTB ^= _BV(PB2);
_delay_ms(500);
PORTB ^= _BV(PB2);
PORTB ^= _BV(PB3);
_delay_ms(500);
PORTB ^= _BV(PB3);
PORTB ^= _BV(PB4);
_delay_ms(500);
PORTB ^= _BV(PB4);
}
}
|