I am programming the LCD of my MSP430FR6989 development board (MSP-EXP430FR6989), and I have a question regarding generating VLCD (V1) and LCD biasing.
The development board got a 14-segment, 6 digit LCD connected to the MSP430 (MSP-EXP40FR6989 User Guide pg 11/41), and the MSP430 got an LCD module (LCD_B and LCD_C module).
In order to turn on a segment, we set the relevant segment line (Sx) and the COM line (COMx), by writing a certain word to the LCDCMEMx registers.
These are the things we need to configure before writing values into the LCDCMEMx registers:
- Set th Vlcd (V1) to be sourced from internally from the charge pump or externally.
- set the value of Vlcd (V1)
- set the bias, 1/2 bias or 1/3 bias.
- configure the source of V2 - V4, internally or externally (R23 pin, R13/LCDREF pin, R03 pin)
- Source V5 from Vss or from external R03 pin
- set the LCD's frequency (flcd)
- Add a capacitor to the LCDCAP/R33 pin.
- set the correct segments and COMs using the LCDCMEMx registers
- Turn on the LCD
I would like to have V1 sourced internally, 1/3 bias, V2 - V4 sourced externally from R23 and R13/LCDREF pins, V5 sourced from R03 pin, flcd = 512Hz, Vlcd (V1) = 3.44V, the MSP-EXP430FR6989 has a capacitor and resistor network attached to it (MSP-EXP430FR6989 User Guide pg 29/41).
As you can see in the code below this is the value written to LCDCVCTL (SFR responsible for the LCD_C module's voltage) LCDCVCTL = 0x1E68
which is 0001 1110 0110 1000
That is the code relevant to the LCD Voltage and bias generation FYI
#include <msp430.h>
//code
#define ENABLE_PINS 0xFFFE
#define TURN_ON_LCD (LCDCCTL0 |= LCDON)
#define TURN_OFF_LCD (LCDCCTL0 &= (~LCDON))
#define CLEAR_LCD_MEM (LCDCMEMCTL |= LCDCLRM)
//code
void init_LCD (void);
void show_Char (unsigned char ch, unsigned int pos);
inside main ()
function
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
PM5CTL0 = ENABLE_PINS;
//code
init_LCD ();
show_Char('F',1);
show_Char('O',2);
show_Char('R',3);
show_Char('A',4);
show_Char('T',5);
TURN_ON_LCD;
while(1);
return 0;
}
Inside the init_LCD ()
void init_LCD (void)
{
//code
//configuring: COM0 COM1 COM2 COM3
//R23 R13/LCDREF R03
P6SEL1 |= (BIT0 | BIT1 | BIT2 | BIT3 | BIT4 | BIT5 | BIT6);
P6SEL0 |= (BIT0 | BIT1 | BIT2 | BIT3 | BIT4 | BIT5 | BIT6);
LCDCCTL0 = (LCDPRE__16 | LCDDIV_3 | LCD4MUX | LCDLP);
LCDCVCTL = 0x1E68;//external biasing
//VLCD = 1111, LCDCPEN = 1, VLCDREF = 00, VLCD = 3.44V
//R03EXT = 1, V5 sourced from R03 pin
//LCDEXTBIAS = 1, V2 - V4 sourced externally, and internal bias generator is switched off
//VLCDEXT = 0, VLCD (V1) is sourced internally from the Charge Pump
//LCDPEN = 1, Charge Pump is enabled
//LCD2B = 0, 1/3 Bias
//LCDCVCTL = 0x1E08; //V2 - V4 generated internally
LCDCCPCTL = LCDCPCLKSYNC;//TI
CLEAR_LCD_MEM;
}
However, when I build and download the code into the development board, I don't see any segments being turned ON.
I changed the code to configure the LCD's bias to be sourced internally LCDCVCTL = 0x1E08
which is 0001 1110 0000 1000
, and the LCD segments got turned ON.
LCDCVCTL = 0x1E08;
//VLCD = 3.44V
//Charge Pump enabled
//V1 generated internally
//V2 - V4
Kindly help me with this issue
Documents I used for reference: