搞了两套程序,官方的不显示我自己的按照映射关系写入RAM不正常。
我使用的时Com4-7这是官方的
CLK_PeripheralClockConfig(CLK_Peripheral_LCD, ENABLE);
/* Initialize the LCD */
LCD_Init(LCD_Prescaler_2, LCD_Divider_18, LCD_Duty_1_4,
LCD_Bias_1_3, LCD_VoltageSource_Internal);
/* Mask register*/
LCD_PortMaskConfig(LCD_PortMaskRegister_0, 0xFF);
LCD_PortMaskConfig(LCD_PortMaskRegister_1, 0x0F);
LCD_PortMaskConfig(LCD_PortMaskRegister_2, 0x00);
LCD_PortMaskConfig(LCD_PortMaskRegister_3, 0x00);
LCD_ContrastConfig(LCD_Contrast_Level_7);
LCD_DeadTimeConfig(LCD_DeadTime_0);
LCD_PulseOnDurationConfig(LCD_PulseOnDuration_1);
LCD_Cmd(ENABLE); /*!< Enable LCD peripheral */
|