- void LCD_Init(void)
- {
- OLED_GPIO_Init();
-
- LCD_SCL_H;
- //LCD_CS=1;
-
- LCD_RST_L;
- LCD_DLY_ms(50);
- LCD_RST_H;
-
- Set_Display_On_Off(0x00); // Display Off (0x00/0x01)
- Set_Display_Clock(0x80); // Set Clock as 100 Frames/Sec
- Set_Multiplex_Ratio(0x3F); // 1/64 Duty (0x0F~0x3F)
- Set_Display_Offset(0x00); // Shift Mapping RAM Counter (0x00~0x3F)
- SetStartLine(0x00); // Set Mapping RAM Display Start Line (0x00~0x3F)
- Set_Charge_Pump(0x04); // Enable Embedded DC/DC Converter (0x00/0x04)
- SetAddressingMode(0x02); // Set Page Addressing Mode (0x00/0x01/0x02)
- Set_Segment_Remap(0x01); // Set SEG/Column Mapping 0x00???? 0x01??
- Set_Common_Remap(0x08); // Set COM/Row Scan Direction 0x00???? 0x08??
- Set_Common_Config(0x10); // Set Sequential Configuration (0x00/0x10)
- SetContrastControl(Brightness); // Set SEG Output Current
- Set_Precharge_Period(0xF1); // Set Pre-Charge as 15 Clocks & Discharge as 1 Clock
- Set_VCOMH(0x40); // Set VCOM Deselect Level
- Set_Entire_Display(0x00); // Disable Entire Display On (0x00/0x01)
- Set_Inverse_Display(0x00); // Disable Inverse Display On (0x00/0x01)
- Set_Display_On_Off(0x01); // Display On (0x00/0x01)
- LCD_Fill(0x00); //????
- LCD_Set_Pos(0,0);
-
-
- }
|