Skip to content

v0.4.0 - Add Custom LCD Commands

Choose a tag to compare

@idunmore idunmore released this 23 Aug 14:55
· 13 commits to main since this release
b568cf8

This release adds custom LCD keywords for manipulating an HD44780 (or M68) based LCD, LED or VFD display. They are conditionally compiled, since the LCD initialization can hang a BE6502 if either the LCD isn't connected OR it is wired in 8-bit mode.

Running make will include the LCD commands by default; run make LCD=0 to exclude these extensions.

The included binary (basic.bin) has the LCD commands enabled.

Added LCD Keywords

Thirteen keywords are provided. They are real EhBASIC keywords, not CALLs, so they tokenize and LIST like anything else. They are ported from the same command set my Microsoft BASIC build for this board carries, so programs move between the two with little more than a retype.

Command Argument What it does
LCDCLS clear the display, which also sends the cursor home
LCDHOME cursor to the first character of the first line
LCDPRINT expression list print to the display
LCDCURPOS n byte set the DDRAM address, which is where the next character lands
LCDDDRAM n byte the same command under its hardware name
LCDMOVECUR n signed move the cursor right (n positive) or left (n negative)
LCDSCROLL n signed scroll the display right (n positive) or left (n negative)
LCDCURENABLE n byte 0 turns the cursor off, anything else turns it on
LCDCURBLINK n byte 0 stops the cursor blinking, anything else starts it
LCDCGRAM n byte point writes at the character generator instead of the screen
LCDCGCHRS expression list write character generator data as characters
LCDCGBYTE n byte write one character generator byte as a number
LCDCMD n byte send a raw HD44780 instruction byte