Knowledge Base

The mechanics of programming the LCD are quite simple. There are 4 basic steps:

  1. initialize the LCD
  2. Position the cursor
  3. Display text
  4. Display numbers

The key to success is careful planning; planning of exactly what you will display and planning of exactly where it will be displayed and how much space it will take.

One useful planning tool is to type up intended displays on your computer using a mono-spaced font like Courier New or Fixed Sys, for example:

0123456789012345 (ruler line)
Temp = 34.5°C OK
Press=12.3kPa Hi

Here the top line is used as a ruler, showing column numbers for a 16 character line. You can see I had to sacrifice the spaces before and after the equals sign in the pressure display, in order to fit in the status indicator.

The following pages provide some worked code examples for various situations.