void OLED_Init()
{
unsigned char i;
RES=0;
for(i=0;i<200;i++)
{
uDelay(200);
}
RES=1;
Set_Display_On_Off(0xAE); // Display Off (0xAE/0xAF)
Set_Display_Clock(0xA0); // Set Clock as 80 Frames/Sec
Set_Multiplex_Ratio(0x3F); // 1/64 Duty (0x0F~0x3F)
Set_Display_Offset(0x00); // Shift Mapping RAM Counter (0x00~0x3F)
Set_Start_Line(0x00); // Set Mapping RAM Display Start Line (0x00~0x3F)
Set_Master_Config(0x8E); // Disable Embedded DC/DC Converter (0x8E/0x8F)
Set_Area_Color(0x05); // Set Monochrome & Low Power Save Mode
Set_Addressing_Mode(0x02); // Set Page Addressing Mode (0x00/0x01/0x02)
Set_Segment_Remap(0xA1); // Set SEG/Column Mapping (0xA0/0xA1)
Set_Common_Remap(0xC8); // Set COM/Row Scan Direction (0xC0/0xC8)
Set_Common_Config(0x12); // Set Alternative Configuration (0x02/0x12)
Set_LUT(0x3F,0x3F,0x3F,0x3F); // Define All Banks Pulse Width as 64 Clocks
Set_Contrast_Control(Brightness); // Set SEG Output Current
Set_Area_Brightness(Brightness); // Set Brightness for Area Color Banks
Set_Precharge_Period(0x82); // Set Pre-Charge as 8 Clocks & Discharge as 2 Clocks
Set_VCOMH(0x3C); // Set VCOM Deselect Level
Set_Entire_Display(0xA4); // Disable Entire Display On (0xA4/0xA5)
Set_Inverse_Display(0xA6); // Disable Inverse Display On (0xA6/0xA7)
Fill_RAM(0x00); // Clear Screen
Set_Display_On_Off(0xAF); // Display On (0xAE/0xAF)
}
我要赚赏金打赏帖 |
|
|---|---|
| 基于MCP23S17的输入输出功能模块控制被打赏¥20元 | |
| 【S32K3XX】SPD 软件包使用Link文件修改被打赏¥22元 | |
| Switch-Case局部变量定义问题被打赏¥23元 | |
| 基于米尔TIAM62L开发板的串口通信及应用被打赏¥20元 | |
| PCF8574功能模块及其使用被打赏¥20元 | |
| 传感器LSM6DSO及LIS3MDL的功能检测被打赏¥18元 | |
| LPS25HB气压传感器及其检测被打赏¥18元 | |
| HTS221温湿度传感器及其检测被打赏¥18元 | |
| 【S32K3XX】HSE FW 版本更新被打赏¥21元 | |
| 基于ArduinoUNO开发板的AT24C02读写测试被打赏¥16元 | |
我要赚赏金
