Gast
#100647
hi alle, ich bin zu blöd um strings im rom abzlegen glauube ich. ich habe mehrere beiträge gelesen, aber irgendwie klappt das nicht. vielleicht habe ich nur was übersehen. hier der code const char pms01[] PROGMEM = "starting ...\0"; const char pms02[] PROGMEM = "starting VS1001\0"; const char pms03[] PROGMEM = "VS1001 OK\0"; const char pms04[] PROGMEM = "starting MMC\0"; const char pms05[] PROGMEM = "MMC OK\0"; const char pms06[] PROGMEM = "starting FAT\0"; const char pms07[] PROGMEM = "FAT OK\0"; PGM_P pgm_strings[2] PROGMEM = { pms01, pms02 }; // if c == 0x01 then a new line is added void USART_sendpgmstring (u08 id, u08 c) { char buf[16]; char *str = &buf[0]; u08 i =0; strcpy_P(buf, pgm_strings[id]); // parse and send string until end is found while ((*str != (char)0) && (*str != (char)10)&& (i<16)){ USART_send ((u08)*str++); i++; }; if(c ==0x01) USART_newline(); } aber über usart kommen nur hyroglyphen raus. john