Modern Device LCD117/ PH Anderson's Serial LCD Driver Commands
reference adopted from http://phanderson.com/lcd106/lcd107.html
The currently shipping chips
seem to be LCD117 and LCD118. LCD 117 is a 9600 baud chip
that is recommended for Arduino, Basic Stamp and most microcontrollers, which
are capable of 9600 bps
serial transmission.
Some commands require a following pause.
| Command / Comments |
Suggested Pause |
Example |
|
| send text |
Serial.print("Hello World!"); |
||
| ?a |
home cursor |
Serial.print("?a"); |
|
| ?b |
destructive backspace |
Serial.print("?b"); // backspace |
|
| ?c# |
set cursor style, 0= none 2= blinking 3=underline |
("?c0"); // turn cursor off |
|
| ?f |
clear screen |
Serial.print("?f"); |
|
| ?g |
Beep (requires speaker on pin 6) |
Serial.print("?g"); |
|
| ?h |
Backup Cursor (Non-destructive backspace) |
Serial.print("?h"); |
|
| ?i |
Forward cursor |
Serial.print("?i"); |
|
| ?j |
Up cursor |
Serial.print("?j"); |
|
| ?k |
Down cursor |
Serial.print("?k"); |
|
| ?l |
Clear cursor line |
Serial.print("?k"); |
|
| ?m |
Carriage Return |
Serial.print("?m"); |
|
| ?n |
CRLF, cursor at start of next line, line cleared |
Serial.print("?n"); |
|
| ?s# |
Set tabs at # spaces |
100ms |
Serial.print("?s7");
|
| ?t |
Tab, advance one tab position |
Serial.print("?t"); |
|
| ?x## |
Position
cursor on x column, (two characters are required), first column is column
0 |
Serial.print("?x09");
|
|
| ?y# |
Position
cursor at y row, first row is row 0, |
Serial.print("?y3");
|
|
| ?? |
display a "?" |
Serial.print("??"); |
|
| ?! |
Send direct command to LCD |
Serial.print("?!01"); |
|
| ?B |
Backlight Intensity Ð sets PWM value, two hex digits req. (00 to FF) |
100ms |
Serial.print("?BFF");
|
| ?D# |
Define Character
"?D#1A001A001A001A00" D# = character |
100ms |
Serial.print("?D31F001F001F001F00"); |
| ?# |
Print a custom
character |
5ms |
Serial.print("?3);
|
| ?H |
High output on auxiliary digital pins: valid numbers are 4,5,6 |
Serial.print("?H4");
|
|
| ?L |
Low output on auxiliary digital pins: valid numbers are 4,5,6 |
Serial.print("?L4"); // aux pin 4 LOW |
|
| ?G |
Configure for LCD geometry. Supported formats: 2X16, 2X20, 2X24, 2X40, 4X16 and 4X20. |
Serial.print("?G216"); |
|
| Ganging up commands is OK, except for commands requiring a following pause |
Serial.print("?x01?y1?fHello
World"); |
||
| Enhanced Commands |
|||
| ?># |
Enter BIG Number Mode (numbers only!) "?>3" X # = 3 or 4 , # represents number of characters displayed. (20x4 LCD's only) |
100ms |
Serial.print("?>4"); |
| ?< |
Exit BIG number mode "?<" |
Serial.print("?<"); |
|
| ?C# |
Define custom boot screen line # = 0 - 3 |
100ms |
Serial.print("?C0abcdefghijklmnopqrst" |
| ?S# |
"?S1" ' display the configuration setting on boot "?S0" ' display no screen on boot. "?S2" ' display the user custom text screen on boot. |
Serial.print("?S2); //custom boot screen |