本帖最后由 byz1027004184 于 2015-11-24 09:35 编辑
各位大神,我用STM32L152自带的LCD控制器驱动段式液晶屏,段式液晶屏占空比1/4,偏压比1/3,驱动电压为3.0v.初始化代码如下:
void LCDInit(void){
LCD_InitTypeDef LCD_InitStructure;
RCC_LSICmd(ENABLE);
while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET);
RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI);
LCD_GPIOConfig();
RCC_APB1PeriphClockCmd(RCC_APB1Periph_LCD, ENABLE);
LCD_InitStructure.LCD_Prescaler = LCD_Prescaler_8;
LCD_InitStructure.LCD_Divider = LCD_Divider_16;
LCD_InitStructure.LCD_Duty = LCD_Duty_1_4;
LCD_InitStructure.LCD_Bias = LCD_Bias_1_3;
LCD_InitStructure.LCD_VoltageSource = LCD_VoltageSource_Internal;
LCD_Init(&LCD_InitStructure);
LCD_HighDriveCmd(ENABLE);
/*!< Configure the Pulse On Duration */
LCD_PulseOnDurationConfig(LCD_PulseOnDuration_7);
/*!< Configure the LCD Contrast (2.99V) */
LCD_ContrastConfig(LCD_Contrast_Level_3);
/*!< Wait Until the LCD FCR register is synchronized */
LCD_WaitForSynchro();
/*!< Enable LCD peripheral */
LCD_Cmd(ENABLE);
/*!< Wait Until the LCD is enabled */
while(LCD_GetFlagStatus(LCD_FLAG_ENS) == RESET);
/*!< Wait Until the LCD Booster is ready */
while(LCD_GetFlagStatus(LCD_FLAG_RDY) == RESET);
}
可是残影问题严重,有没有大神有过这方面的经历,一起讨论一下。
问题已经解决,问题原因是飞线导致了信号的失真,谢谢各位的热心解答。
|