Is there a way to write on multiple line on the lcd screen? control chars/escape/etc dont seem to work passing to `lcdstring`
Does the ANS 700 have the same ROM as an ANS 500?
Here's the version, size, checksum, and md5 of the ANS 500 ROM:
077d.28f2 4096 962f6c13 676809c236138574282fa8416c6c5a6d "./ROM 1.1.22 ANS 500
The ANS 500 ROM has an Open Firmware driver for the LCD which does support some control and escape characters. Open it like this:
Code:
unselect-dev
0 value lcd-ih
" lcd" 2dup find-device open-dev dup . dup to lcd-ih to my-self
The number that is output is the instance handle that was opened. It should be non-zero if successful.
my-self
may be reset to zero if you type an incorrect command. You can just re-open the device again or do
lcd-ih to my-self
Then you can write to the LCD like this:
" hello" write
Or like this:
" hello" " write" lcd-ih $call-method
The
write
word for the LCD seems to support the following special characters:
- 0x08: back space - Left one character and erase it.
- 0x09: tab - Output lanks to the next multiple of 8 column number.
- 0x0A: linefeed - Down one line, clear the line, go to column 0.
- 0x0B: Up one line.
- 0x0C: lcd-init - Goto line 0 column 0.
- 0x0D: Ignore.
- 0x1B: escape - Begins an escape sequence. Only 5B is accepted as the second character. Characters
0
- 9
end the escape sequence (and do nothing). 0x44 (character D
does a back space and continues the escape sequence.
Writing beyond the end of a line does a line feed to continue on the next line. I believe there are 20 characters per line.
Characters that change the line number transmit a line number change command (each line uses a different command: 0x80, 0xC0, 0x94, 0xD4). There's other commands (0x01, 0x02, 0x04, 0x06, 0x0f, 0x38). Are the LCD commands documented somewhere?
To use the special characters, put the hex in the string surrounded by
"(
and
)
like this:
" abc"(0A)def"(0B)ghi(080808)jkl" " write" lcd-ih $call-method
Actually, since lcd has a write command, it might be usable as the Open Firmware output device:
" lcd" output