Skip to content
This repository

Using the Kit

Displayable Characters

All standard characters a-z, A-Z, 0-9 are displayable, as well as all punctuation marks and many other miscellaneous symbols. Byte values between 0×20 and 0×7F will result in the standard ASCII-encoded character. Additionally, byte values between 0xA1 and 0xFF will result in a range of special characters including greek characters, mathematic symbols, and accented letters. For a full list of these characters consult the table at the end of the GDM1602K datasheet.

A carriage return (ENTER), ASCII 0×0D, will advance the cursor to the next row. If it’s on the bottom row, it’ll move to the top.

A line feed (CTRL+ENTER), ASCII 0×0A, will move the cursor to the beginning of the following row. If it’s on the bottom row, it’ll move to the beginning of the top.

A tab, ASCII 0×09, will advance the cursor 5 places.

The backspace character, ASCII 0×08, will operate as a standard backspace: moving the cursor back one digit, and deleting the character there.

Special Commands

Backlight Command (0×80)

  • To control the intensity of the backlight, send the backlight control byte (0×80) followed by a second byte representing the backlight value.
  • The backlight value can be anywhere between 0 and 255. A value of 0 turns the backlight completely off, 255 turns the backlight 100% on, 127 is 50%, etc.
  • Once the value is received the backlight is changed, and the value is stored in EEPROM. So upon powering off and back on, the backlight intesnsity will be restored.
  • The intensity of the LCD’s backlight is controlled using PWM on pin D9.

Baud Rate Control (0×81)

The baud rate defaults to 9600bps. To set the baud rate to a different value, send the baud rate control byte (0×81) followed by a second data byte.

The data byte will control the baud rate as according to the following table:
0: 300
1: 1200
2: 2400
3: 4800
4: 9600
5: 14400
6: 19200
7: 28800
8: 38400
9: 57600
10: 115200
>10: No change

Once the data byte is received the baud rate will be changed. The baud rate is stored in EEPROM, so upon power off and on the baud rate setting will be retained.

Special Commands (0xFE)

To access the special commands send the special command byte (0xFE) followed by the desired data byte. The data bytes are as follows:

  • Clear LCD (0×01)
    This command will clear the LCD and reset the cursor to the top left of the display.
  • Move cursor right one digit (0×14)
    This command will advance the cursor to the right one digit. If the cursor is at the very end of the row, it will move to the next (i.e. if it’s at the end of the top it’ll move to the bottom, if it’s at the end of the bottom it’ll move to the beginning of the top.
  • Move cursor left one digit (0×10)
    This command will advance the cursor to the left one digit. If the cursor is at the very beginning of the row, it will move to the end of the last (i.e. if it’s at the beginning of the top it’ll move to the end of the bottom, if it’s at the beginning of the bottom it’ll move to the end of the top.
  • Scroll display right (0×1C)
    This command will move everything on the display to the right one digit. There is no wrap-around, so characters at the far right of the display will disappear; they are stored in memory and will still be there if you shift the display back to the left.
  • Scroll display left (0×18)
    This command will move everything on the display to the left one digit. There is no wrap-around, so characters at the far left of the display will disappear; they are stored in memory and will still be there if you shift the display back to the right.
  • Turn display off (0×08)
    This command turns the display off. This command has no effect on the backlight.
  • Turn display on (0×0C)
    If the display is off, this command will turn the display back on. Any characters that were being displayed when the LCD was turned off, will reappear in the same location.
  • Underline cursor on (0×0E)
    This command will turn the underline cursor on. The cursor will move one digit to the right after a character is displayed on the LCD. If the blinking box cursor is on, it will be turned off and the underline cursor will be turned on..
  • Underline cursor off (0×0C)
    If the underline cursor is on, this command will turn the underline cursor off.
  • Blinking box cursor on (0×0D)
    This command will turn the blinking box cursor on. If the underline cursor is on, it will be turned off and the blinking box cursor will be turned on.
  • Blinking box cursor off (0×0C)
    If the blinking box cursor is on, this command will turn it off.
  • Set cursor position (0×80)
    Following the set cursor position command 0×80, the user must send one more data byte. For a 2×16 display (with 32 digits), the data byte should be between 0 and 31, where 0 is the top left digit of the display and 31 is the bottom right. If a value above 31 is sent, the cursor becomes the remainder of that divided by 32 (i.e. 32 is equivalent to 0, 66 is equivalent to 2).
  • Enable/disable Splash Screen (0×1E)
    This command will enable or disable the splash screen seen when initially turning the Serial LCD Kit on. The operation of this command will depend upon what the splash screen setting is currently set to.

Note: You’ll notice the 0×0C command is used in three different instances. The result of this command will depend on which state the display is in. If the display is off, 0×0C will turn it on, but will have no effect on the cursor. If the display is on, and the underline cursor is on, 0×0C will turn that cursor off. Likewise for the blinking box cursor. If the display is not in any one of those states, the 0×0C command will have no effect.

Something went wrong with that request. Please try again.