added arduino archive programs to /firmware/ref/archive-code/arduino
[athena:athena.git] / firmware / ref / archive-code / atmega / sample.c
1 \r
2 #include <avr/io.h>\r
3 #include <util/delay_basic.h>\r
4 #include <util/delay.h>\r
5 \r
6 \r
7 #define F_CPU 1000000UL\r
8 \r
9 //typedef unsigned char uchar;\r
10 \r
11 \r
12 \r
13 \r
14 int main()\r
15 {\r
16 \r
17         \r
18         \r
19         DDRB = 0xff;\r
20 \r
21         \r
22 \r
23         while(1)\r
24         {\r
25 \r
26                 PORTB=0xff;\r
27                 _delay_ms(4000);\r
28                 PORTB=0x00;\r
29                 _delay_ms(4000);\r
30 \r
31         }\r
32 \r
33 \r
34 }\r