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.

MSP430FR6047: LCD driverlib code is not working on EVMmsp430fr6047 board

Part Number: MSP430FR6047
Other Parts Discussed in Thread: MSP430WARE

Tool/software:

Hello team, 

when i flash the LCD driverlib sample code from MSP430FR5xx_6xx_DriverLib_Users_Guide-2_91_13_01.pdf(page 251) document, it's not working, however when execute the LCD register based code from TI Examples , its working fine. need help to resolve it on EVMmsp430fr6047 board.

not working code

MSP430FR5xx_6xx_DriverLib_Users_Guide-2_91_13_01.pdf , refer page 251. it has few wrong macros, i have corrected it, still its not working. 

working code


#include "msp430.h"

#define A1_DIGIT LCDM1 //Digit A1
#define A1_AlPHA LCDM2 //Alphanumeric part of A1
#define A2_DIGIT LCDM3 //Digit A2
#define A2_AlPHA LCDM4 //Alphanumeric part of A2
#define A3_DIGIT LCDM5 //Digit A3
#define A3_AlPHA LCDM6 //Alphanumeric part of A3
#define A4_DIGIT LCDM7 //Digit A4
#define A4_AlPHA LCDM8 //Alphanumeric part of A4
#define A5_DIGIT LCDM9 //Digit A5
#define A5_AlPHA LCDM10 //Alphanumeric part of A5

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

int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop WDT

PJSEL0 = BIT4 | BIT5; // For LFXT

//Initialize COMS pins and External bias resistor pins
P6SEL0 = (BIT1 | BIT2 | BIT3 | BIT4 | BIT5 | BIT6 | BIT7);
P6SEL1 = (BIT1 | BIT2 | BIT3 | BIT4 | BIT5 | BIT6 | BIT7);

// Initialize LCD segments 0 - 26;
LCDCPCTL0 = 0xFFFF; //0-15
LCDCPCTL1 = 0x07FF; //16-26

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

// Configure LFXT 32kHz crystal
CSCTL0_H = CSKEY >> 8; // Unlock CS registers
CSCTL4 &= ~LFXTOFF; // Enable LFXT
do
{
CSCTL5 &= ~LFXTOFFG; // Clear LFXT fault flag
SFRIFG1 &= ~OFIFG;
}while (SFRIFG1 & OFIFG); // Test oscillator fault flag
CSCTL0_H = 0; // Lock CS registers

// Initialize LCD_C
// ACLK, Divider = 1, Pre-divider = 16; 4-pin MUX
LCDCCTL0 = LCDDIV__1 | LCDPRE__16 | (LCDMX1+LCDMX0+LCDSON) | LCDLP;

// Charge pump disabled
//Internal VLCD, external Rx3 pins, external contrast
LCDCVCTL = LCDREXT | R03EXT;
//To use internal bias resistors: LCDCVCTL = 0;

LCDCCPCTL = LCDCPCLKSYNC; // Clock synchronization enabled

LCDCMEMCTL = LCDCLRM; // Clear LCD memory

A1_DIGIT = lcd_num[4]; //Display number 4 on A1
A2_DIGIT = lcd_num[3]; //Display number 3 on A2
A3_DIGIT = lcd_num[0]; //Display number 0 on A3

//Turn LCD on
LCDCCTL0 |= LCDON;

__bis_SR_register(LPM3_bits | GIE);
__no_operation();

return 0;
}

Many Thanks,

Venkatarramana

**Attention** This is a public forum