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

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
Things To keep in mid 
 
Supply Voltage
              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.
 
LCD Contrast 
           
         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 FUNCTION
PORT1.0 Pin 1 11 D4
PORT1.1 Pin 2 12 D5
PORT1.2 Pin 3 13 D6
PORT1.3 Pin 4 14 D7
PORT1.6 Pin 8 6 EN
PORT1.7 Pin 9  4 RS

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
#include “lcd16.h”

Routines  in the program

void lcdinit(void);                          // This routine take no input and return nothing. it initialize the lcd    
void integerToLcd(int integer ); );     //This routine take an integer as input and print that number to LCD
void lcdData(unsigned char l); // This rountine take a ASCII value  and print the corresponding char to the LCD
void prints(char *s);  // This rountine take a String value as input and print the corresponding char to the LCD
void gotoXy(unsigned char  x,unsigned char y); //This routine will take the cursor to a specific position on the lcd. 



CLICK HERE TO DOWNLOAD The SOURCE CODE

 

More Articles to Read

Single-Sided USB Charger
Single-Sided USB Charger
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Replace a microwave’s beeping with the Windows XP startup sound
Replace a microwave’s beeping with the Windows XP startup sound
A DIY Laser Scanning Microscope
A DIY Laser Scanning Microscope
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
ESP8266 LED lighting: QuinLED v2.6 PCB
ESP8266 LED lighting: QuinLED v2.6 PCB
Switching LVDS Graphics in a Laptop Computer
Switching LVDS Graphics in a Laptop Computer
Teleknitting: TV-based string art
Teleknitting: TV-based string art
DIY Bubble Machine
DIY Bubble Machine
Start your day with Nerf target practice!
Start your day with Nerf target practice!
Teardown of a Peaktech 6225A
Teardown of a Peaktech 6225A

Top




Shares