Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.
16×2 Char LCD with TI MSP430 Launch Pad
what we are gonna do is interfacing MSP430 with an LCD module. In this case a typical 16×2 parallel LCD module with the Texas Instruments’ MSP430G2211 on Launchpad development board. i will not cover much on the LCD side because i have already explained the working of HD44780 LCD in my previous post.
if you are new to LCD and have no idea how to make them work. checkout my previous post
The MSP430 (like most MCUs today) runs on 3.3-3.5V. If you get an LCD module that only work with 5V then be prepared to either have separate voltage sources for your MCU and LCD or have the ability to step up/down your voltage source. Here’s a link that has some ideas on how to do this.
or You can also use Transistor or Mosfet based Translator
Microcontroller SideLCD Side
but is guess at most of time you don’t need a level translator . all you have to do the is power the 5V type lcd with 5v and let the signal line 3.5 volts . i have tested this kind of circuit and it worked fine.
i seen some lcd which works with both of the power (3.5V and 5V) supply but contrast is as low as you need to have special focus on the lcd to see the characters on the lcd . so be aware of low lcd contrast when 3.5 v power is there
MSP430 Pin configuration to LCD
Here’s how the MCU pins are interfaced to the LCD. all pin Number with MSP430G2211
MCU PIN Number
LCD PIN Number
PORT1.0 Pin 1
PORT1.1 Pin 2
PORT1.2 Pin 3
PORT1.3 Pin 4
PORT1.6 Pin 8
PORT1.7 Pin 9
The other LCD pins connections are as follows:
Pin 16 | GND
Pin 15 | Power for LED
Pin 5 | (R/W) is grounded because we are always writeing to lcd (UPDATED)
Pin 3 | Outout from potentiometer for LCD contrast
Pin 1 | GND
Pin 2 | Vcc
Software Source Code
The software code is easy to under sand and reusable in another application because
i have created a header file which have all the routines to control the lcd
all you have to do is copy the hearder file lcd16.h and lcd16.c into your project directory
Routines in the program
voidlcdinit(void); // This routine take no input and return nothing. it initialize the lcd
voidintegerToLcd(int integer ); ); //This routine take an integer as input and print that number to LCD
voidlcdData(unsignedchar l); // This rountine take a ASCII value and print the corresponding char to the LCD
voidprints(char *s); // This rountine take a String value as input and print the corresponding char to the LCD
voidgotoXy(unsignedchar x,unsignedchar y); //This routine will take the cursor to a specific position on the lcd.