-#define F_CPU 1000000UL\r
-\r
-#include <avr/io.h>\r
-\r
-int main(void)\r
-{\r
- uint8_t pb = 0x00;\r
- int8_t dir = 1;\r
- volatile uint16_t i;\r
-\r
- DDRB = 0xff;\r
-\r
- while(1) {\r
- pb += dir;\r
- PORTB = pb;\r
-\r
- for (i = 0; i < (pb<<5); i++) {}\r
-\r
- if ((pb == 0) || (pb == 0xff))\r
- dir = -dir;\r
- }\r
-\r
- return 0;\r
-}\r
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <stdio.h>
+#include "usart.h"
+#include "i2c.h"
+
+int main(void)
+{
+ uint8_t pb = 0x00;
+ int8_t dir = 1;
+ volatile uint16_t i;
+
+ DDRB = 0xff;
+
+ usart_init();
+ i2c_init();
+
+ sei();
+
+ printf("Hallo!\n");
+
+ while(1) {
+ pb += dir;
+ PORTB = pb;
+
+ for (i = 0; i < (pb<<5); i++) {}
+
+ if ((pb == 0) || (pb == 0xff))
+ dir = -dir;
+ }
+
+ return 0;
+}