Skip to content
Nathan Seidle edited this page Feb 17, 2015 · 27 revisions

Welcome to the SerLCD wiki!

###1 Overview

The SerLCD v2.5 is a simple and cost effective solution for interfacing to Liquid Crystal Displays (LCDs) based on the HD44780 controller. The SerLCD module takes incoming 9600bps TTL level signals and displays those characters on the LCD screen. Only three wires - 5V, GND, and Signal - are needed to interface to the LCD.

Please report typos, inaccuracies, and especially unclear explanations to us at [email protected]. Suggestions for improvements are welcome and greatly valued.

###1.1 Features in Version 2.5

SerLCD v2.5 has some new features that make the SerLCD even more powerful and economical:

  • New PIC 16F688 utilizes onboard UART for greater communication accuracy
  • Adjustable baud rates of 2400, 4800, 9600 (default), 14400, 19200, and 38400
  • Operational backspace
  • Greater process speed at 8MHz
  • Incoming buffer stores up to 80 characters
  • Backlight transistor can handle up to 1 amp
  • Pulse width modulation of backlight allows direct control of backlight brightness and current consumption
  • All surface mount design allows a backpack that is half the size of the original
  • Faster boot-up time
  • User definable splash screen
  • Boot-up display can be turned on/off via firmware

###2 Interface Specifications

-> Default communications occur at 9600 bps with 8 bits of data, 1 start bit, 1 stop bit, and no parity. <-

The SerLCD is controlled using actual ASCII characters. This means that if you pass the ASCII character 'r' to the module an 'r' will be display on the LCD at the next cursor position. There are only two exceptions to this. These are the command characters decimal 254 (0xFE) and 124 (0x7C).

###3 Configuration

-> All setting are stored on onboard EEPROM and loaded during power up. <-

Backlight Brightness Value Brightness 128 Off 140 40% On 150 73% On 157 Fully On 158 Not Valid

###3.1 Backlight

The SerLCD v2.5 pulse width modulates the backlight via a 1A BJT transistor. This allows the user to set 1 of 30 different brightness settings.

By sending the special command character 0x7C (decimal 124) followed by a number 128 to 157 the backlight PWM value will be set. This is handy when power consumption of the unit must be minimized. By reducing the brightness the overall backlight current consumption is reduced.

###3.2 LCD Type Setup

The SerLCD v2.5 firwamre includes settings to interface to the following types of LCDs: 2x16, 2x20, 4x16, 4x20.

If you purchase the SerLCD soldered to an LCD it has already been configured to work with that specific LCD. You should not have to configure anything.

LCD Setup LCD Type Value 20 Characters Wide 3 16 Characters Wide 4 4 Lines 5 2 Lines 6

If you purchased the SerLCD module by itself you will have to tell the module what type of LCD it is going to be or is currently attached to.

To control what type of LCD the SerLCD module is attached to transmit the special command - 124 (0x7C). Follow this command with either 3, 4, 5, or 6. These commands set the LCD character width and number of lines. These settings are used to correctly wrap the cursor to keep it within the viewable screen. The type of LCD is saved to EEPROM after each change.

###3.3 Extended LCD Commands

The HD44780 LCD controller is very common. The extended commands for this chip include but are not limited to following:

HD44780 Commands Clear display 0x01 Move cursor right one 0x14 Move cursor left one 0x10 Scroll right 0x1C Scroll left 0x18 Turn visual display on 0x0C Turn visual display off 0x08 Underline cursor on 0x0E Underline cursor off 0x0C Blinking box cursor on 0x0D Blinking box cursor off 0x0C Set cursor position 0x80 + number

Please refer to the HD44780 datasheet for more information.

Clear display and set cursor position are the two commands that affect the SerLCD the most. By sending these commands to the SerLCD the cursor position gets changed. This change is tracked by the firmware and cursor wrapping is performed normally. A cursor move to outside the viewable area is possible and the cursor position variable will be updated accurately.

Clone this wiki locally