Help me NHD-2.8-25664UMB3 Initialize!
Hello Guys, I am the first person to use your OLED.
I've been trying to initialize it for a few days, but I couldn't see a dot on the OLED.
I am using parallel 8080 mode.
I want anyone to see my program and tell me where it went wrong
I thoroughly followed the initialization code in the datasheet :'(
And initialized in main code :
BS0_L;
BS1_H;
CS_L;
E_H;
Below code is I used to initialize the OLED.
void oled_Command_25664(unsigned char Data)
{
LATD = (LATD & 0xff00) | (unsigned char)(Data);
DC_L;
CS_L;
RW_L;
E_H;
delay_ms(10);
E_H;
RW_H;
CS_L;
DC_L;
}
//--------------------------------------------------------------------------
//send Data to OLED
//--------------------------------------------------------------------------
void oled_Data_25664(unsigned char Data)
{
LATD = (LATD & 0xff00) | (unsigned char)(Data);
DC_H;
CS_L;
RW_L;
E_H;
delay_ms(10);
E_H;
delay_ms(10);
RW_H;
CS_L;
DC_H;
}
void OLED_Init_25664(void)
{
unsigned char i;
RES_L;
delay_ms(100);
RES_H;
Set_Command_Lock_25664(0x12); // Unlock Basic Commands (0x12/0x16)
Set_Display_On_Off_25664(0x00); // Display Off (0x00/0x01)
Set_Column_Address_25664(0x1C,0x5B);
Set_Row_Address_25664(0x00,0x3F);
Set_Display_Clock_25664(0x91); // Set Clock as 80 Frames/Sec
Set_Multiplex_Ratio_25664(0x3F); // 1/64 Duty (0x0F~0x3F)
Set_Display_Offset_25664(0x00); // Shift Mapping RAM Counter (0x00~0x3F)
Set_Start_Line_25664(0x00); // Set Mapping RAM Display Start Line (0x00~0x7F)
Set_Remap_Format_25664(0x14); // Set Horizontal Address Increment
// Column Address 0 Mapped to SEG0
// Disable Nibble Remap
// Scan from COM[N-1] to COM0
// Disable COM Split Odd Even
// Enable Dual COM Line Mode
Set_GPIO_25664(0x00); // Disable GPIO Pins Input
Set_Function_Selection_25664(0x01); // Enable Internal VDD Regulator
Set_Display_Enhancement_A_25664(0xA0,0xFD); // Enable External VSL
Set_Contrast_Current_25664(0x9F); // Set Segment Output Current
Set_Master_Current_25664(0x0F); // Set Scale Factor of Segment Output Current Control
//Set_Gray_Scale_Table(); // Set Pulse Width for Gray Scale Table
Set_Linear_Gray_Scale_Table_25664(); //set default linear gray scale table
Set_Phase_Length_25664(0xE2); // Set Phase 1 as 5 Clocks & Phase 2 as 14 Clocks
Set_Display_Enhancement_B_25664(0x20); // Enhance Driving Scheme Capability (0x00/0x20)
Set_Precharge_Voltage_25664(0x1F); // Set Pre-Charge Voltage Level as 0.60*VCC
Set_Precharge_Period_25664(0x08); // Set Second Pre-Charge Period as 8 Clocks
Set_VCOMH_25664(0x07); // Set Common Pins Deselect Voltage Level as 0.86*VCC
Set_Display_Mode_25664(0x02); // Normal Display Mode (0x00/0x01/0x02/0x03)
Set_Partial_Display_25664(0x01,0x00,0x00); // Disable Partial Display
Set_Display_On_Off_25664(0x01);
}
somebody help me :'(
f someone can share the code, it's okay to email me.
parkha1106@gmail.com
and I used dsPIC MCU
f someone can share the code, it's okay to email me.
parkha1106@gmail.com
and I used dsPIC MCU
« Last Edit: February 04, 2020, 02:55:35 AM by Hyeon »
0
-
Hello,
Please reference the example code for the 2.8" Multi-Font OLED: https://newhavendisplay.com/content/app_notes/2.8-Multi-Font.pdf
Please let us know if this helps.0
Please sign in to leave a comment.
Comments
1 comment