From 6a2255a19d8871f5e42a01d2fff425ce77ce3e8b Mon Sep 17 00:00:00 2001 From: IOsetting Date: Sat, 4 Jun 2022 14:56:28 +0800 Subject: [PATCH] fix: adjust pcd8544 contrast --- demo/spi/pcd8544_nokia5110_lcd/pcd8544.c | 2 +- demo/spi/pcd8544_nokia5110_lcd/pcd8544_stc8h3k.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/demo/spi/pcd8544_nokia5110_lcd/pcd8544.c b/demo/spi/pcd8544_nokia5110_lcd/pcd8544.c index 6461822..e5c0cb6 100644 --- a/demo/spi/pcd8544_nokia5110_lcd/pcd8544.c +++ b/demo/spi/pcd8544_nokia5110_lcd/pcd8544.c @@ -129,7 +129,7 @@ void PCD8544_SetDisplayNormal(void) void PCD8544_Init(void) { PCD8544_Reset(); - PCD8544_SetContrast(0x06, 0x3F); + PCD8544_SetContrast(0x06, 0x20); PCD8544_SetDisplayNormal(); } diff --git a/demo/spi/pcd8544_nokia5110_lcd/pcd8544_stc8h3k.c b/demo/spi/pcd8544_nokia5110_lcd/pcd8544_stc8h3k.c index d7fc919..7d6774b 100644 --- a/demo/spi/pcd8544_nokia5110_lcd/pcd8544_stc8h3k.c +++ b/demo/spi/pcd8544_nokia5110_lcd/pcd8544_stc8h3k.c @@ -79,7 +79,7 @@ int main(void) PCD8544_SetDisplayBlank(); SYS_Delay(200); PCD8544_SetDisplayNormal(); - SYS_Delay(200); + SYS_Delay(500); PCD8544_Fill(0); PCD8544_DrawLine(0, 0, 83, 0, 1); @@ -87,6 +87,7 @@ int main(void) PCD8544_DrawLine(83, 0, 83, 47, 1); PCD8544_DrawLine(0, 47, 83, 47, 1); PCD8544_UpdateScreen(); + SYS_Delay(500); PCD8544_GotoXY(3, 3); PCD8544_Puts("LCD:PCD8544", &Font_5x7, 1); @@ -101,8 +102,7 @@ int main(void) PCD8544_SetPowerDownMode(HAL_State_ON); SYS_Delay(1000); PCD8544_SetPowerDownMode(HAL_State_OFF); - SYS_Delay(2000); - + SYS_Delay(1000); PCD8544_SetDisplayInverted(); SYS_Delay(1000); PCD8544_SetDisplayNormal(); @@ -124,7 +124,7 @@ int main(void) } SYS_Delay(1000); } - PCD8544_SetContrast(0x06, 0x3F); + PCD8544_SetContrast(0x06, 0x20); PCD8544_Fill(0); y1 = 47, y2 = 0;