VLCD电压 3.3V。
void LCD_GLASS_Init(void)
{
/* Enable LCD clock */
CLK_PeripheralClockConfig(CLK_Peripheral_LCD, ENABLE);
CLK_RTCClockConfig(CLK_RTCCLKSource_HSI, CLK_RTCCLKDiv_64);
/* Initialize the LCD */
LCD_Init(LCD_Prescaler_2, LCD_Divider_18, LCD_Duty_1_8,
LCD_Bias_1_4, LCD_VoltageSource_External);
// total 19 segments [seg00:seg18]
/* Mask register*/
LCD_PortMaskConfig(LCD_PortMaskRegister_0, 0xFF);
LCD_PortMaskConfig(LCD_PortMaskRegister_1, 0xFF);
LCD_PortMaskConfig(LCD_PortMaskRegister_2, 0x07);
LCD_PortMaskConfig(LCD_PortMaskRegister_3, 0x00);
LCD_PortMaskConfig(LCD_PortMaskRegister_4, 0x00);
LCD_PortMaskConfig(LCD_PortMaskRegister_5, 0x0F);
LCD_ContrastConfig(LCD_Contrast_Level_7);
LCD_PulseOnDurationConfig(LCD_PulseOnDuration_7);
LCD_Cmd(ENABLE); /*!< Enable LCD peripheral */
} |