I'm using ATmega 8 (8L - 8PI) , I am trying to blink two LED's in alternate order with legs PB0 and PB6 for each LED's but its not working..
1 | #define F_CPU 1000000UL |
2 | |
3 | #include <avr/io.h> |
4 | #include <util/delay.h> |
5 | |
6 | int
|
7 | main (void) |
8 | {
|
9 | DDRB |= _BV(DDB0); |
10 | DDRB |= _BV(DDB6); |
11 | while(1) |
12 | {
|
13 | PORTB = 00000001; |
14 | _delay_ms(500); |
15 | PORTB = 01000000; |
16 | |
17 | _delay_ms(500); |
18 | }
|
19 | }
|