💾 Archived View for gem.librehacker.com › gemlog › tech › 20220427-0.gmi captured on 2023-11-04 at 12:01:03. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

Forth LCD Driver Development

As a useful introduction to programming my Rpi Pico using Mecrisp Stellaris Forth, I have been writing driver words for the "standard" (HD44780U-compatible) LCD display. The product I have is a Sunfounder LCD2004 which has a 20x4 character display. My drivers assume a 4-bit hookup directly to the D4-D7 pins, and that we are only doing writing, not reading, from the LCD memory. As an interesting side note, unused DDRAM on the LCD module could in principle be used to store and retrieve any data you want.

Here is a photo of the usual "Hello world!" test:

"Hello World!" LCD test

Here is a photo from testing DDRAM addressing, to reposition the cursor:

Testing while changing the DDRAM address

The words I have so far are rather low-level, but such as they are, they are available from this codeberg repository:

mf-lcd project code repository