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.

为什么lcd显示一直出不来,压根就没有显示呢?我用的MSP430FG479,LCD_A 模块。

Other Parts Discussed in Thread: MSP430FG479

我用的液晶是4-MUX,1/3bias 的笔段式液晶(com0-com3) (so-s27).  我采用外部电阻分压,R03/R13/R23/R33之间分别接了一个330k的电阻,R03与地之间也接了一个330k的电阻  ,R33没有接vcc,而是用软件设置为Vlcd采用内部的AVcc(VLCDx=0000)。  下面是我的程序,希望能帮我看一下

#include<msp430.h>
#include<msp430fg479.h>

#define A 0x08 // define the segments of the LCD
#define B 0x80
#define C 0x20
#define D 0x01
#define E 0x02
#define F 0x04
#define G 0x40
#define DP 0x10

const char char_gen[]=
{
A+B+C+D+E+F, //0
B+C, //1
A+B+G+E+D, //2
A+B+C+D+G, //3
B+C+F+G, //4
A+F+G+C+D, //5
A+F+E+G+C+D, //6
A+B+C, //7
A+B+C+D+E+F+G, //8
A+B+C+D+F+G, //9
DP // dot
};


//void LCD_INIT(); //液晶初始化程序

int main(void)
{
volatile unsigned int i;

WDTCTL = WDTPW +WDTHOLD; // Stop WDT
FLL_CTL0 |= XCAP18PF; // Configure load caps

// Wait for xtal to stabilize
do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0x47FF; i > 0; i--); // Time for flag to set
}
while ((IFG1 & OFIFG)); // OSCFault flag still set?


P5SEL =0xfc; // Set COM pins for LCD
LCDACTL = LCDON+LCD4MUX+LCDFREQ_96; // 4mux LCD, ACLK/96
LCDAPCTL0 = 0x7F; // Segments 0-27
LCDAPCTL1=0x00; //Vlcd=AVcc and disable the charge pump.
LCDAVCTL0=0X60;
LCDAVCTL1=0X00;


for( i = 0; i < 20; i ++)
{
LCDMEM[i] = 0; // Clear LCD
}

for (i=0;i<7;i++)
{
LCDMEM[i] = char_gen[i];
}
_BIS_SR(LPM3_bits); // Enter LPM3

}