copcom-weber
18.11.2013, 10:05
Hallo
habe ähnlich wie bei der M32 die Libs verändert aber da kommt nur misst bei raus.
habe es so abgeändert:
h. lib
void _showScreenLCD_P(const char *line1, const char *line2, const char *line3, const char *line4);
#define showScreenLCD(__line1,__line2,__line3,__line4); ({_showScreenLCD_P((PSTR(__line1)),(PSTR(__line2)) ,(PSTR(__line3)),(PSTR(__line4)));})
c. lib
void initLCD(void)
{
delayCycles(34000); //No need for Power ON delay as usually the
// Bootloader should have been executed before...
PORTG &= ~DISP_WR;
PORTG &= ~DISP_RS_ALE;
PORTG &= ~DISP_EN_RD;
mSleep(5);
writeLCDCommand(0b00101100);
delayCycles(55500);
mSleep(50);
writeLCDCommand(0b00001001);
delayCycles(55500);
mSleep(5);
writeLCDCommand(0b00101000);
delayCycles(55500);
mSleep(5);
writeLCDCommand(0b00001000);
delayCycles(55500);
mSleep(1);
writeLCDCommand(0b00000001);
delayCycles(55500);
mSleep(1);
writeLCDCommand(0b00000010);
delayCycles(55500);
mSleep(1);
writeLCDCommand(0b00001100);
delayCycles(55500);
mSleep(1);
mSleep(5);
clearLCD();
}
und
void _showScreenLCD_P(const char *line1, const char *line2, const char *line3, const char *line4)
{
clearLCD();
writeNStringLCD_P(line1);
setCursorPosLCD(1, 0);
writeNStringLCD_P(line2);
setCursorPosLCD(2, 0);
writeNStringLCD_P(line3);
setCursorPosLCD(3, 0);
writeNStringLCD_P(line4);
}
/**
* Sets the cursor position on LCD.
*/
void setCursorPosLCD(uint8_t line, uint8_t pos)
{
pos |= 128;
if(line==1) pos += 0x40;
if(line==2) pos += 0x14;
if(line==3) pos += 0x54;
writeLCDCommand(pos);
}
was ist daran nun falsch?
danke schonmal
habe ähnlich wie bei der M32 die Libs verändert aber da kommt nur misst bei raus.
habe es so abgeändert:
h. lib
void _showScreenLCD_P(const char *line1, const char *line2, const char *line3, const char *line4);
#define showScreenLCD(__line1,__line2,__line3,__line4); ({_showScreenLCD_P((PSTR(__line1)),(PSTR(__line2)) ,(PSTR(__line3)),(PSTR(__line4)));})
c. lib
void initLCD(void)
{
delayCycles(34000); //No need for Power ON delay as usually the
// Bootloader should have been executed before...
PORTG &= ~DISP_WR;
PORTG &= ~DISP_RS_ALE;
PORTG &= ~DISP_EN_RD;
mSleep(5);
writeLCDCommand(0b00101100);
delayCycles(55500);
mSleep(50);
writeLCDCommand(0b00001001);
delayCycles(55500);
mSleep(5);
writeLCDCommand(0b00101000);
delayCycles(55500);
mSleep(5);
writeLCDCommand(0b00001000);
delayCycles(55500);
mSleep(1);
writeLCDCommand(0b00000001);
delayCycles(55500);
mSleep(1);
writeLCDCommand(0b00000010);
delayCycles(55500);
mSleep(1);
writeLCDCommand(0b00001100);
delayCycles(55500);
mSleep(1);
mSleep(5);
clearLCD();
}
und
void _showScreenLCD_P(const char *line1, const char *line2, const char *line3, const char *line4)
{
clearLCD();
writeNStringLCD_P(line1);
setCursorPosLCD(1, 0);
writeNStringLCD_P(line2);
setCursorPosLCD(2, 0);
writeNStringLCD_P(line3);
setCursorPosLCD(3, 0);
writeNStringLCD_P(line4);
}
/**
* Sets the cursor position on LCD.
*/
void setCursorPosLCD(uint8_t line, uint8_t pos)
{
pos |= 128;
if(line==1) pos += 0x40;
if(line==2) pos += 0x14;
if(line==3) pos += 0x54;
writeLCDCommand(pos);
}
was ist daran nun falsch?
danke schonmal