I recently bought some LCD's ; all are made in PRC, and "full compatible with HD44780 standard".
I try to use with an "old" schematic (with an "old" display (model -PRC 1602 A) this schematic work without any problem !).
But ... with original code (with only this : "LCDOUT $FE, 1, $FE, $0C" line ), none of them is initialized correctly on first "start" !
I put one picture with ...stranges characters that appear on the display (to all of them !).
After modification of program, they go right ... in 7 cases of 10 (I mean when I power on the schematic ...).
Code:
DEFINE LCD_DREG PORTC ' LCD on port c
DEFINE LCD_DBIT 0 ' Data bits C0..C3
DEFINE LCD_RSREG PORTA ' RS on PORTA
DEFINE LCD_RSBIT 1 ' RS on A1
DEFINE LCD_EREG PORTA ' E on PORTA
DEFINE LCD_EBIT 2 ' E on A2
DEFINE LCD_BITS 4 ' LCD 4 bit mode
DEFINE LCD_LINES 2 ' 2 line LCD display
Define LCD_COMMANDUS 2000 ' Command Delay (uS)
Define LCD_DATAUS 50 ' Data Delay (uS)
LCDOUT $FE,1:PAUSE 3000:LCDOUT $FE,1 ' Initialize LCD WITH HUGE PAUSE !!!
Pause 3000 ' AND AGAIN ...
LcdOut $FE, $80," DUAL TERMOMETER "
LcdOut $FE, $C0," AND THERMOSTAT "
PAUSE 5000 ' AND AGAIN ...
LCDOUT $FE, 1, $FE, $0C ' Clear display, cursor off
Pause 1000
What can I do in this case ? Thanks in advance for any suggestion !
Bookmarks