error: stray ‘\327′ in program

OP #2584123
Lesenswert?

Hallo,

ich habe versucht das hier

http://elektronik.jfh-dueppel.de/?page_id=212&cpage=1#comment-1943

in meinen ATMEGA32 zu packen. Aber ich bekomme immer den Fehler error: 
"stray ‘\327′ in program"

habe die  “lcd-routines.h” richtig eingebunden.

Der eine ist doch die lcd-routines.h und der andere Code ist doch das 
main.c, oder?

Ich verwende einen ATMega32 und ein 2x16 LCD Diplay.

Kann mir da jemand helfen?

Vielen Dank & Grüße

Flow
OP #2585580
Lesenswert?

hab ich gemacht aber immer noch das selbe.

Das sind die Fehler:

Build started 8.3.2012 at 23:06:55
avr-gcc  -mmcu=atmega32 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT LCD_TEST3.o 
-MF dep/LCD_TEST3.o.d  -c  ../LCD_TEST3.c
../LCD_TEST3.c: In function 'lcd_init':
../LCD_TEST3.c:48: error: stray '\327' in program
../LCD_TEST3.c:48: error: expected ')' before numeric constant
../LCD_TEST3.c:58: error: stray '\327' in program
../LCD_TEST3.c:58: error: expected ')' before numeric constant
../LCD_TEST3.c:59: error: stray '\327' in program
../LCD_TEST3.c:63: error: stray '\327' in program
../LCD_TEST3.c:63: error: expected ')' before numeric constant
../LCD_TEST3.c:64: error: stray '\327' in program
../LCD_TEST3.c:65: error: stray '\327' in program
../LCD_TEST3.c:65:5: error: invalid digit "8" in octal constant
../LCD_TEST3.c:66: error: stray '\327' in program
../LCD_TEST3.c:69: error: stray '\327' in program
../LCD_TEST3.c:69:18: error: invalid digit "8" in octal constant
../LCD_TEST3.c:69: error: expected ')' before numeric constant
../LCD_TEST3.c:70: error: stray '\327' in program
../LCD_TEST3.c:71: error: stray '\327' in program
../LCD_TEST3.c:72: error: stray '\327' in program
../LCD_TEST3.c:75: error: stray '\327' in program
../LCD_TEST3.c:75: error: expected ')' before numeric constant
../LCD_TEST3.c:76: error: stray '\327' in program
../LCD_TEST3.c:77: error: stray '\327' in program
../LCD_TEST3.c: In function 'lcd_clear':
../LCD_TEST3.c:110: error: stray '\327' in program
../LCD_TEST3.c:110: error: expected ')' before numeric constant
../LCD_TEST3.c: In function 'lcd_home':
../LCD_TEST3.c:118: error: stray '\327' in program
../LCD_TEST3.c:118: error: expected ')' before numeric constant
../LCD_TEST3.c: In function 'lcd_setcursor':
../LCD_TEST3.c:132: error: stray '\327' in program
../LCD_TEST3.c:132: error: expected ';' before numeric constant
../LCD_TEST3.c:132: error: stray '\327' in program
../LCD_TEST3.c:136: error: stray '\327' in program
../LCD_TEST3.c:136: error: expected ';' before numeric constant
../LCD_TEST3.c:136: error: stray '\327' in program
../LCD_TEST3.c:140: error: stray '\327' in program
../LCD_TEST3.c:140: error: expected ';' before numeric constant
../LCD_TEST3.c:140: error: stray '\327' in program
../LCD_TEST3.c:144: error: stray '\327' in program
../LCD_TEST3.c:144: error: expected ';' before numeric constant
../LCD_TEST3.c:144: error: stray '\327' in program
../LCD_TEST3.c: In function 'lcd_string':
../LCD_TEST3.c:159: error: stray '\221' in program
../LCD_TEST3.c:159: error: stray '\' in program
../LCD_TEST3.c:159:24: warning: missing terminating ' character
../LCD_TEST3.c:159: error: missing terminating ' character
../LCD_TEST3.c:160: error: expected ')' before 'lcd_data'
../LCD_TEST3.c:161: error: expected expression before '}' token
../LCD_TEST3.c: In function 'lcd_generatechar':
../LCD_TEST3.c:169: error: stray '\327' in program
../LCD_TEST3.c:169: error: expected ')' before numeric constant
make: *** [LCD_TEST3.o] Error 1
Build failed with 44 errors and 1 warnings...
Angehängte Dateien:
Persönliche Seite #2585797
Lesenswert?

Florian Ludwig schrieb:
> gibt es einen übersetzer der mir aus
> 0x04  = 0b00000010 (kann falsch sein) oder so macht? Dann würde ich die
> #define damit austauschen.

Das aber ist dann kein sauberes C mehr, sondern etwas, was nur 
ausgesuchte Compiler verstehen. Lern einfach mit hexadezimalen Zahlen 
umgehen, dann brauchst Du sowas nicht. Haben vor Dir auch 
hunderttausende andere geschafft.

Die von Dir geposteten Quelltexte enthalten das Zeichen '×' nicht mehr, 
daher glaube ich nicht, daß Du nach wie vor diese Fehlermeldung 
erhältst, oder aber Du hast mehrere Kopien des Quelltextes und 
compilierst immer die falsche Version davon.
OP #2586923
Lesenswert?

Hi,

hattest recht. Habe es als neues Projekt angelegt und es lässt sich 
kompilieren.

Habe dann noch das main eingefügt und dann noch wie in der lcd-routines 
definiert das Display angeschlossen und es auf den ATMEGA32 gebrannt. 
Leider erscheint nix auf dem LCD.

Kann mir da nochmal jemand netterweise helfen?.

Meine Belegung des Displays:
DisplayPin / ATMEGA32Pin
1 / GND
2 / VSS
3 / Poti für Kontrast
4 / PD4
5 / GND <---- ist das korrekt?
6 / PD5
7 / nix
8 / nix
9 / nix
10/ nix
11/ PD0
12/ PD1
13/ PD2
14/ PD3
15/ VSS
16/ GND

Stimmt das so?

Vielen Dank für eure Mühen.

Grüße

Flow
Angehängte Dateien:

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren