parallax 4x20 or 2x16 is there a clear screen command?
Hi guys I have been trying to find a clear screen command or something equivalent to clear the LCD screen completely after a reset does anyone know how to do it?
there is nothing in the manual that I can see?
there is nothing in the manual that I can see?
Comments
In the Data sheet it has this info just go·to link where you buy the Displays and·you should see the pdf· file for it
'
[noparse][[/noparse] I/O Definitions ]
' LCD············ PIN···· 15············· ' Four LCD Display·or Two Line·Display··
'
[noparse][[/noparse] LCD Constants ]
·
DispLightOn···· ·CON···· $11
DispLightOFF·· · CON···· $12
LineOne0········ ·CON···· $80
LineOne1········· CON···· $81
LineTwo0·········CON···· $94
LineTwo1······ · CON···· $95
LineTwo4······ · CON···· $98
LineThree0····· ·CON···· $A8
LineFour0······ ·CON···· $BC
ClearScreen···· CON···· $0C
Baud············· ·CON···· 32············· ' baudmode constant for LCD Display
'
[noparse][[/noparse] Program Code ]
DO
SEROUT LCD, Baud, [noparse][[/noparse]Clearscreen]
PAUSE 100
SEROUT LCD, Baud, [noparse][[/noparse]LineOne0,·· " HELLO WORLD"]
PAUSE 1000
LOOP
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 6/9/2009 1:17:47 AM GMT
Sam thank you for the code very helpful I tried shutting off the display but it does nto clear the ram and as soon as you turn it back on the text shows up.
another thing I do not completely understand
If you want to print an ASCII character or text you issue the command 32 but if you look on the list of commands it goes from 32-127 when I issue the command
Baud19200 CON 32 I can print out ASCII text on the display but what the heck are the rest of the commands from 32-127 for???? I know 32=ASCII but 33,34,35?????
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
so I just converted the hex code to dec 12 and tried to send it with the esc 12 through this terminal program . you can not send the commands in hex or binary just dec I just wanted to see if it would clear the command it did not so I must be doing something wrong
I can send any of the commands this way and have tried most of the , turn backlight on , turn screen off, move cursor that sort of thing
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Searider
Chris this program lets you type characters on your serial LCD either the 2X16 or the 4X20 using the debug terminal in the basic stamp editor 2.4.2 you can also send all the LCD commands by hitting "ESC" then typing your command in Dec, well I mean one command at a time but it will work with any of the command listed in the documention.
Thanks again guys
Attached
@mikediv – Thanks for mentioning the program. As much as I was involved with these displays I wasn’t aware we had released such a program. It is interesting though it would seem the author didn’t take the clear screen command into consideration. I will notify our Tech Support Dept. in case they want to correct that and update the code. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering