16×2 LCD Display Shield

This page provides the driver modules for the 16×2 LCD shield that I have developed for the MSP430Lauchpad with the MSP430G2553 chip. The Shield uses a MIDAS 16×2 character LCD display and includes 5 momentary switches that can be used to create a user interface. It also provides a three terminal screw block to allow for easy connection to pins P1.4 and P1.5 on the MSP430G2553. These pins can be used for analogue input.

Thanks to Andy for the PCB design and fabrication.

An example Energia project file for this shield is available here. The example code is all written in c and contains the LCD module that controls the LCD and interfaces to the switches that are on the shield and the i2c module for communication between the MSP430G2553 and the LCD. The example shows how to initialise the LCD and write strings to the display, it also demonstrates using the switches to move the cursor around the display. The Select switch toggles through the cursor states, off, blinking, etc.

The Example project LCDDisplayShieldExample.ino in the zip file will open directly in Energia. This example will have a blank LCDDisplayShieldExample tab as this simply acts as the project file when using Energia to code in c. The top level code is in the main.c tab, the LCD function definitions are all contained within the LCDDisplay.h module header file, and the code in LCDDisplay.c this module makes use of an i2c.h and i2c.c module that contains the code to allow communication with the LCD display using i2c serial communications. Note: This driver is designed to work with the MSP430G2553 chip and you will need to select this device in tools This code will not work from within a native Energia Script (a version of c++)  as this code makes use of interrupts which are handled in a hidden manner when using an Energia Script. More details on using Energia as an environment for MSP430 c code development can be found here.

Note for this shield to work you must remove the Jumper J5 that connects P1.6 to the Green LED as this pin is used for the I2C serial communication to the LCD display.

Get the c example code from GitHub

There is also a library for the LCD screen that is written in c++ that can be used directly within standard Energia Sketches. This c++ library does not implement methods for the switches that are on the LCD shield.

Get the c++ library from GitHub

LCD Display Data Sheet

The PCB Layout and circuit diagram are shown below

LCD Display Shield PCB Layout and Circuit Diagram showing connections to the MSP430G2553

LCD Display Shield PCB Layout and Circuit Diagram showing connections to the MSP430G2553

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s