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.

MSP430FR4133: LCD configuration in static mode

Part Number: MSP430FR4133

Hi!

I am using MSP430fr4133 launchpad. I configure LCD in static mode & it doesn't work. I want to run NXP LCD which has one backplane from this result .

Please provide help.

Here is my code.

***********LCD.c***************

#include <msp430.h>
#include "global.h"

#define LCDMEMW ((int*)LCDMEM)

const char digit[10] =
{
0xFC, // "0"
0x60, // "1"
0xDB, // "2"
0xF3, // "3"
0x67, // "4"
0xB7, // "5"
0xBF, // "6"
0xE4, // "7"
0xFF, // "8"
0xF7 // "9"
};

void LCDInit(void)
{
//unsigned char Value=0;
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

// Configure XT1 oscillator
P4SEL0 |= BIT1 | BIT2; // P4.2~P4.1: crystal pins
do
{
CSCTL7 &= ~(XT1OFFG | DCOFFG); // Clear XT1 and DCO fault flag
SFRIFG1 &= ~OFIFG;
}while (SFRIFG1 & OFIFG); // Test oscillator fault flag
CSCTL6 = (CSCTL6 & ~(XT1DRIVE_3)) | XT1DRIVE_2; // Higher drive strength and current consumption for XT1 oscillator


// Disable the GPIO power-on default high-impedance mode
// to activate previously configured port settings
PM5CTL0 &= ~LOCKLPM5;

// Configure LCD pins
SYSCFG2 |= LCDPCTL; // R13/R23/R33/LCDCAP0/LCDCAP1 pins selected

LCDPCTL0 = 0xFFFF;
LCDPCTL1 = 0x07FF;
LCDPCTL2 = 0x00F0; // L0~L26 & L36~L39 pins selected

LCDCTL0 = LCDSSEL_0 | LCDDIV_7; // flcd ref freq is xtclk

// LCD Operation - Mode 3, internal 3.08v, charge pump 256Hz
LCDVCTL = LCDCPEN | LCDREFEN | VLCD_6 | (LCDCPFSEL0 | LCDCPFSEL1 | LCDCPFSEL2 | LCDCPFSEL3);

LCDMEMCTL |= LCDCLRM; // Clear LCD memory

LCDCSSEL0 = 0x0001; // Configure COMs and SEGs

LCDCSSEL1 = 0x0000; // L0, L1, L2, L3: COM pins
LCDCSSEL2 = 0x0000;

LCDM0 = 0x11; // L0 = COM0, 
LCDM1 = 0x00;

LCDCTL0 |= LCDSTATIC | LCDON; // Turn on LCD, 2-mux selected

PMMCTL0_H = PMMPW_H; // Open PMM Registers for write
PMMCTL0_L |= PMMREGOFF_L; // and set PMMREGOFF
}

//======================================

int LCDDataOut(int data,int position)
{

LCDMEM[pos4] = digit[data];
}

//__bis_SR_register(LPM3_bits | GIE); // Enter LPM3.5
//__no_operation(); // For debugger

***********main.c***************

#include <msp430.h>
#include"global.h"

unsigned int counter = 0;

int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
LCDInit();

//P4.0 set as o/p for led
P4DIR |= BIT0; // Set P4.0 to output direction
P4OUT &= ~(BIT0); // set P4.0 to 0 ( OFF)

while(1)
{

LCDDataOut(1,pos2);
__delay_cycles(10);

}
}

  • Hi Swati,

    If I'm understanding you correctly, you're trying to interface the MSP430FR4133 LaunchPad with a static NXP display that is not the one provided on the LaunchPad? If this is the case, can you provide the display information and how you have the LCD connected to the MSP430FR4133?

    Also, I noticed a bug in your code:

    int LCDDataOut(int data,int position)

    {

           LCDMEM[pos4] = digit[data];

    }

    This code ignored the position that is passed to it and automatically uses pos4.

    Best regards, 
    Caleb Overbay

  • Thanks Caleb!!

    Yeah you are right. I want to interface launchpad lcd pins with NXP LCD operates in static mode.

    Here is attached document of LCD. It has 6 digits & two common line. Could you pls help me or provide any solution for interfacing of this lcd with launchpad lcd pins.

    We only required (a+b+c+d+e+f+g) segments. pls provide any solution that how can I interface this LCD.

    Whether my static mode configuration is rightVI-611-4.pdf?

  • Hi Swati,

    Could you provide a schematic showing how the display is currently being connected to the MSP430?

    Best regards,
    Caleb Overbay
  • 2526.VI-611-4.pdfHere is (28)pins on my design that reserved for LCD interfacing .

    P7.0 - P7.7

    P3.0 - P3.7

    P6.0 - P6.7

    P2.0 - P2.3

    & I have to interface NXP LCD to these pins. So what is the best solution?

  • Hi Swati,

    Do you have a more detailed data sheet for the NXP LCD than the one you've linked to? Also, have you already tried connecting these pins to the LCD? If so can you provide a schematic showing which pins are connected?

    Best regards,
    Caleb Overbay

**Attention** This is a public forum