Hallo
Ich habe folgendes Problem.
Ich bekomme von einem Navilock folgenden String gesendet:
$GPRMC,120135.100,V,2400.00004,N,12100.00004,E,0000.00,000.00,280606,,,N
*4D\r\n
$GPVTG,000.00,T,,M,0000.00,N,00000.00,K,N*02\r\n
$GPGGA,120135.200,2400.00004,N,12100.00004,E,0,00,0.0,0.00,M,0.00,M,,000
0*6F\r\n
Angezeigt werden diese auch richtig aber wenn ich auf das "uart_new==1"
im Code abfrage und dann was im Display anzeigen will kommt nichts. Ohne
die Abfrage kommt es. Woran kann es liegen?
1 | ISR(USART_RXC_vect)
|
2 | {
|
3 | static uint8_t str_count=0;
|
4 | char nextChar;
|
5 | nextChar = UDR;
|
6 | if ( nextChar != '\n')
|
7 | {
|
8 | uart_string[str_count] = nextChar;
|
9 | str_count++;
|
10 | }
|
11 | else
|
12 | {
|
13 | uart_string[str_count] = nextChar;
|
14 | str_count=0;
|
15 | uart_new=1;
|
16 | }
|
17 | }
|