This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401R: MSP 432 with 16X2 lcd

Part Number: MSP432P401R

Hello,

I am trying to use a 16x2 lcd with MSP432.

I have previously tried the 16x2 lcd with arduino and it worked fine.

Can anyone help me on how to go about coding it in MSP432, either CCS or energia.

I tried the example programs in Energia but I think those are compatible for MSP430 only.

Also, in energia code in says connect LCD's clock pin but there is no clock pin on 16X2 lcd. It says connect reset pin and even thats not there on the lcd.

I have attached the pic of the same.

Kindly help, the code used in energia is examples -> coglcd -> helloworld

  

  • Abhishek Matlotia said:
    Also, in energia code in says connect LCD's clock pin but there is no clock pin on 16X2 lcd. It says connect reset pin and even thats not there on the lcd.

    It's no surprise. Before using library, you you are advised to read it's documentation first: It says: Based on Arduino library for Dog character LCD's. Dog character LCD's are not based on HD44780 parallel I/O controller which most likely is used in your 16x2 LCD, they have SPI insterface instead.

  • So, how should I proceed towards coding 16X2 lcd with MSP432?
  • Abhishek Matlotia said:
    So, how should I proceed towards coding 16X2 lcd with MSP432?

    Definitely not by starting new thread regarding same "issue". Multiple threads does not increase your chances to get result, effect is rather opposite.

    Get familiar with msp432 port I/O, take msp430 16x2 LCD example and modify it for msp432.

  • Well Sir,
    With all respect, I am pretty new to this environment and am bound to get doubts and wish to clarify them till I get the desired results.
    Thank you for your valuable time.
  • Abhishek Matlotia said:
    With all respect, I am pretty new to this environment

    Don't worry. Everybody walked first steps like you are now. Not always there is "ready to consume" project around, sorry. Sometimes you have to learn first, then using small steps approach your target application/project. As already said - get familiar with I/O of msp432, compile and study blink LED example or similar, read msp430 16x2 LCD source code and datasheet of HD44780 to see how it's interfacing works.

    You also have option to get msp430 Launchpad so you can play with msp430 16x2 LCD code to better understand how it works. Anyway if you have any other questions - feel free to ask.

  • Thank you for your kind words.

    I figured out something, The simple code of Hello world display on MSP432 was not getting uploaded, on Windows 8. So, I tried it on my friends Windows 10 and then in got uploaded.

    Though I still have a problem.

    I connected the MSP432 with 16x2 LCD.
    But both lines on 16x2 LCD show black boxes, no words at all.

    Can you please help me on this.

    I am using the following connections and code.

    I copied the liquid crystal library from MSP430 to main library.

    Connections-

    01 - GND             GND
    02 - VCC             +5V
    03 - Contrast        GND 
    04 - RS              Pin35 (P6_7) 
    05 - R/W             GND 
    06 - EN              Pin34 (P2_3) 
    07 - DB0             GND 
    08 - DB1             GND 
    09 - DB2             GND 
    10 - DB3             GND 
    11 - DB4             Pin39 (P2_6) 
    12 - DB5             Pin38 (P2_4) 
    13 - DB6             Pin37 (P5_6) 
    14 - DB7             Pin36 (P6_6) 
    15 - BL+             +5V 
    16 - BL-             GND 

    Code -


    #include <LiquidCrystal.h> 
    LiquidCrystal lcd(35, 34, 39, 38, 37, 36); 
    void setup() { 
      lcd.begin(16, 2); 
      lcd.print("hello, world!"); 

    void loop() { 
      lcd.noDisplay(); 
      delay(500); 
      lcd.display(); 
      delay(500);

  • Update:-
    I was able to connect and code the 16X2 lcd.
    For energia 18 version
    1. Copy liquid crstal library from hardware-> energia -> msp430-> libraries
    2. Paste it into main library.
    3. use the connectons as-
    Connections-

    01 - GND GND
    02 - VCC +5V
    03 - Contrast GND
    04 - RS Pin35 (P6_7)
    05 - R/W GND
    06 - EN Pin34 (P2_3)
    07 - DB0 GND
    08 - DB1 GND
    09 - DB2 GND
    10 - DB3 GND
    11 - DB4 Pin39 (P2_6)
    12 - DB5 Pin38 (P2_4)
    13 - DB6 Pin37 (P5_6)
    14 - DB7 Pin36 (P6_6)
    15 - BL+ +5V
    16 - BL- GND

**Attention** This is a public forum