Jetzt sitze ich schon seit 7 Stunden und versuche die UART zum Laufen zu bringen. Das ist wieder so ein Tag wo nichts hinhaut (aus einen unbekannten Grund). Mein Code:
1 | #include <util/delay.h> |
2 | #include <avr/pgmspace.h> |
3 | #include <avr/interrupt.h> |
4 | #include <avr/eeprom.h> |
5 | #include <inttypes.h> |
6 | #include <math.h> |
7 | #include <avr/eeprom.h> |
8 | #include <stdbool.h> |
9 | |
10 | //Headerfiles+Subroutines---------------------------------------------
|
11 | #include "Unterprogramme.h" |
12 | #include "uart.h" |
13 | #include "protocol.h" |
14 | #include "lcd-routines.h" |
15 | //--------------------------------------------------------------------
|
16 | |
17 | #define UART_BAUD_RATE 9600 //UART Baudrate
|
18 | #define BufferMAX 100
|
19 | |
20 | |
21 | //Global definierte Variablen-----------------------------------------
|
22 | char buffer_str[BufferMAX] = { 0 }; |
23 | unsigned int i = 0; //Zählervariable |
24 | |
25 | //Deklarierte Variablen im EEPROM-------------------------------------
|
26 | |
27 | //Main-Program--------------------------------------------------------
|
28 | int main(void) |
29 | {
|
30 | //UART-init:
|
31 | uart_init(UART_BAUD_SELECT(UART_BAUD_RATE, F_CPU)); |
32 | |
33 | //LCD-INIT
|
34 | lcd_init(); |
35 | lcd_clear(); |
36 | |
37 | //VRBOT_init();
|
38 | |
39 | //After init start the speek recog
|
40 | DDRB = 255; |
41 | //Main-Loop:*********************************************************************
|
42 | while(1) |
43 | {
|
44 | uart_puts("JAA"); |
45 | _delay_ms(500); |
46 | }
|
47 | //back***************************************************************************
|
48 | |
49 | return 0; //END |
50 | }
|
Wäre dankbar wenn jemand vorbeischauen könnte. lg andy