LCD Ausgabe Absturtz

Gast #1012386
Lesenswert?

Hallo,

HW: Atmega 128 Sprache C

es tritt bei einer LCD Ausgabe sporadisch ein Absturtz auf.
Sieht jemand einen Fehler im code?

setupBlock.sprache ist 0 oder 1
1
const char str1[]  PROGMEM = "aaa";
2
const char str2[]  PROGMEM = "bbbb";
3
const char str3[]  PROGMEM = "cccccc";
4
const char str4[]  PROGMEM = "dd";
5
const char str5[]  PROGMEM = "eeeeeee";
6
const char str6[]  PROGMEM = "fffffff";
7
const char str7[]  PROGMEM = "gggggggg";
8
const char str8[]  PROGMEM = "h";
9

10

11
const char *texte1[][SPRACHEN] PROGMEM = {
12
  {str2,str2},
13
  {str3,str3},
14
  {str4,str4},
15
  {str5,str5},
16
  {str6,str6},
17
  {str7,str7},
18
  {str8,str8},
19
  {str1,str1}
20
};
21

22
void text2Lcd (const char *texte[][2], u08 entry)
23
{
24
char work[25];
25

26
strcpy_P( work, (const char*)( pgm_read_word( &(texte[entry][setupBlock.sprache]) ) ) );
27

28
printf("%s",work);
29
}
30

31
//AUFRUF
32
text2Lcd(texte1, 4);
Gast #1012897
Lesenswert?

So schnell läuft der Stack nicht über. Schon gar nicht bei einem 
Mega128.

Aber hilfreich wäre es schon, mal das ganze Programm hier zu sehen - die 
paar Zeilen da oben alleine sind nicht das Problem.

Oliver

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