DATA(0x02); DELAY_US(1); E_ON(); DELAY_US(1); E_OFF(); DELAY_US(1000);
DATA(0x02); DELAY_US(1); E_ON(); DELAY_US(1); E_OFF(); DELAY_US(1000);
DATA(0x08); DELAY_US(1); E_ON(); DELAY_US(1); E_OFF(); DELAY_US(1000);
- DELAY_US(40);
+ DELAY_US(50);
/*
* Display ON/OFF Control
*/
DATA(0x00); DELAY_US(1); E_ON(); DELAY_US(1); E_OFF(); DELAY_US(1000);
DATA(0x0C); DELAY_US(1); E_ON(); DELAY_US(1); E_OFF(); DELAY_US(1000);
- DELAY_US(40);
+ DELAY_US(50);
/*
* Display Clear
*/
DATA(0x00); DELAY_US(1); E_ON(); DELAY_US(1); E_OFF(); DELAY_US(1000);
DATA(0x06); DELAY_US(1); E_ON(); DELAY_US(1); E_OFF(); DELAY_US(1000);
- DELAY_US(40);
+ DELAY_US(50);
}
void lcd_clear(void)
write_command(0x04
| (increment ? (1 << 1) : (0 << 1))
| (shifted ? (1 << 0) : (0 << 0)));
- DELAY_US(40);
+ DELAY_US(50);
}
void lcd_display(bool display, bool cursor, bool blink)
| (display ? (1 << 2) : (0 << 2))
| (cursor ? (1 << 1) : (0 << 1))
| (blink ? (1 << 0) : (0 << 0)));
- DELAY_US(40);
+ DELAY_US(50);
}
void lcd_cursor_shift(Direction dir)
write_command(0x10
| (0 << 3)
| ((Right == dir) ? (1 << 2) : (0 << 2)));
- DELAY_US(40);
+ DELAY_US(50);
}
void lcd_display_shift(Direction dir)
write_command(0x10
| (1 << 3)
| ((Right == dir) ? (1 << 2) : (0 << 2)));
- DELAY_US(40);
+ DELAY_US(50);
}
void lcd_goto(uint8_t x, uint8_t y)
RS_OFF();
write_command(0x80
| (addr & 0x7f));
- DELAY_US(40);
+ DELAY_US(50);
}
void lcd_putc(char c)
{
RS_ON();
write_command(c);
- DELAY_US(46);
+ DELAY_US(50);
}
void lcd_puts(char *str)
void lcd_font_setup_single(FontSet *fs, UserFont index)
{
- uint8_t addr = 0;
+ uint8_t addr = 8 * (int)index;
int i = (int)index, j;
for (j = 0; j < LCD_FONT_HEIGHT; j++) {
RS_OFF();
write_command(0x40 | (addr & 0x3f));
- DELAY_US(40);
+ DELAY_US(50);
RS_ON();
write_command(fs->fontlist[i].data[j]);
- DELAY_US(46);
+ DELAY_US(50);
addr++;
}
for (j = 0; j < LCD_FONT_HEIGHT; j++) {
RS_OFF();
write_command(0x40 | (addr & 0x3f));
- DELAY_US(40);
+ DELAY_US(50);
RS_ON();
write_command(fs->fontlist[i].data[j]);
- DELAY_US(46);
+ DELAY_US(50);
addr++;
}