Need Help LCD 20x4 Initial problem
Duke
Posts: 21
Hello,
I have a problem about standard character LCD 20x4 it is not stable (sometimes cannot display).
I think it is because of my programing, In the LCD initial stage·I use the program from my old 16x2 program
because·I don't how to initial 20x4 LCD, Anyway·it works·the LCD can display but·after·on-off many times it doesn't work
The·program is like this.
·'*** Note LCD Module use data 7 bit = D7 D6 D5 D4 RS R/W EN ***
PAUSE 600······· 'LCD wait power on >500 ms
LCDCMD 1,48······ 'Send wakeup seq to LCD
PAUSE 10········· 'Meet LCD spec
LCDCMD 1,48······ 'Send wakeup seq to LCD
PAUSE 1·········· 'Meet LCD spec
LCDCMD 1,48······ 'Send wakeup seq to LCD
PAUSE 1·········· 'Meet LCD spec
LCDCMD 1,32······ 'Set data 4 bit
LCDCMD 1,40······ 'Set to 2 line mode 5x8 font
LCDCMD 1,8······· 'Turn display off
LCDCMD 1,12······ 'Turn display on without cursor
LCDCMD 1,6······· 'Set to auto-increment cursor (no display shift)
LCDCMD 1,1······· 'Clear the display
'**** End Initial LCD *************************
I think the fault is from my programing. I anyone know how to initial the LCD please help me
correct this program.
Thank you.
Duke..
I have a problem about standard character LCD 20x4 it is not stable (sometimes cannot display).
I think it is because of my programing, In the LCD initial stage·I use the program from my old 16x2 program
because·I don't how to initial 20x4 LCD, Anyway·it works·the LCD can display but·after·on-off many times it doesn't work
The·program is like this.
·'*** Note LCD Module use data 7 bit = D7 D6 D5 D4 RS R/W EN ***
PAUSE 600······· 'LCD wait power on >500 ms
LCDCMD 1,48······ 'Send wakeup seq to LCD
PAUSE 10········· 'Meet LCD spec
LCDCMD 1,48······ 'Send wakeup seq to LCD
PAUSE 1·········· 'Meet LCD spec
LCDCMD 1,48······ 'Send wakeup seq to LCD
PAUSE 1·········· 'Meet LCD spec
LCDCMD 1,32······ 'Set data 4 bit
LCDCMD 1,40······ 'Set to 2 line mode 5x8 font
LCDCMD 1,8······· 'Turn display off
LCDCMD 1,12······ 'Turn display on without cursor
LCDCMD 1,6······· 'Set to auto-increment cursor (no display shift)
LCDCMD 1,1······· 'Clear the display
'**** End Initial LCD *************************
I think the fault is from my programing. I anyone know how to initial the LCD please help me
correct this program.
Thank you.
Duke..
Comments
·· Try the following code and see if it helps.· Let me know how you make out.· Bear in mind, Lcd will need to be set to 1 (constant).· You will also need a variable (nib will suffice) named temp to use this code as it is.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com