Issue about drawing on NHD-1.27-12896UGC3
Dear All,
I am using type NHD-1.27-12896UGC3 in my current project but unfortunately experiencing issues with addressing the pixels. I seems like the display origin is not in the top left corner, but in the bottom left corner.
So I am initializing the display with the sequence given in the datasheet. After the initialization I set the starting and ending column and row addresses with the following code:
Displ_Command(0x15); //Column addresses
Displ_Data(0); //This is the start point
Displ_Data(19); //this is the end point for the column
Displ_Command(0x75); //Row adresses
Displ_Data(0);
Displ_Data(26);
After I have set them I am sending the pixel data to the display with the following code:
Displ_Command(0x5C); //RAM-ba írás
for(uint8_t i=0; i<20; i++)
{
for(uint8_t j=0; j<27; j++)
{
Displ_Data((ZeroR[j])>>2); //ZeroR array contains the RGB pixel values for the number zero
Displ_Data((ZeroG[j])>>2);
Displ_Data((ZeroB[j])>>2);
}
}
When I send number nine to the display, than it appears on the screen like on the attached picture. It seems like the nine is drawn from the bottom towards to top so that it seems like a flipped six. I tried to illuminate the pixel at (0;0) point, and pixel az the bottom left corner was that.
I have cheched the setup sequence multiple times as well as the available commands, but I have not found the reason for this. I would like the display to draw the pixels from top to bottom and from left to right.
Do you have any idea why I am experiencing these issues? Have you ever experienced this?
Thank you very much for your help in advance!
Cheers!
-
Hi Balazs!
I believe this is related to the "Set Re-map / Color Depth" command, please see page 32 in the SSD1351 datasheet. https://newhavendisplay.com/content/app_notes/SSD1351.pdf
oled_Command_12896RGB(0xA0); //Set Re-map, color depth <-----------------0 -
Hi Paul!
Thank you very much for your response.
Well, I have modified the data sent after the command 0xA0. The only modification that resulted normal picture in the screen was the A[1] bit. When I set this to 1, than the number was drawn on the right bottom corner of the display instead of the left bottom. See the picture attached.
I am confused. Is that possible the origin point of the display is in the bottom left position?
Regards, Balazs0 -
Thank you for the information, can you please let me know how the NHD-1.27-12896UGC3 module is mounted in the enclosure? Any chance that it is mounted upside down
Sorry, I have to check for my own sanity...0 -
The display is mounted with its connector on the upper side. So like in the position in the datasheet. (https://imgur.com/a/9n14V) Is this correct? I hope so...
I tried the configuration data 0b10010000 for the A0 register, and this config resulted as in the attached image (https://imgur.com/a/VKwRA). It seems like the character is in the correct form and drawn from the correct corner, but streched and misaligned.
What should I try?
Bests0 -
Hi Paul,
I am still stuck with this problem. Do you have any ideas I should try? What about the orientation of the display is that right?
Regards, Balázs0 -
Hi Balázs,
The NHD-1.27-12896UGC3 module is mounted in the correct orientation, which is always a good start
At this time I'm not entirely sure what is causing the stretched / misaligned text. There obviously is an issue with the initialization sequence that needs to be pin pointed.
Are you available for a brief call today so I can help you troubleshoot?
Tel: +1 (847) 844 8795 - Ask to speak with Paul0 -
Hi Paul,
Well, I am from Hungary so if it is available to speak throuh Skype then I would prefer to do so. If it is okay for you, than may you send me your Skype-name in a personal message?0 -
Hi Paul,
Since we have talked about the possible solutions, I tried them all of them. I have failed to resolve the issue, so I am using the display with this symptom.
I mean I am drawing the characters from left to right and from bottom to top and I have transformed my character arrays to be compatible with this way. Everything is okay with this method however I am curious why it is not working the same way as the display you have tried.
Thank you again for your help!
The display is great and shows nice characters.
Balázs0
Please sign in to leave a comment.
Comments
8 comments