Characters Mirrored on NHD-0420CW Display
Using an NHD-0420CW display with I2C interface, characters are mirrored, and start from right to left on top line of display.
I have used the initialization sequence from the data sheet as follows:
I2C_LCD_WriteControl(0x2A); //function set (extended command set)
I2C_LCD_WriteControl(0x71); //function selection A
I2C_LCD_WriteData(0x5C); // disable internal VDD regulator (2.8V I/O). data(0x5C) = enable regulator (5V I/O)
I2C_LCD_WriteControl(0x28); //function set (fundamental command set)
I2C_LCD_WriteControl(0x08); //display off, cursor off, blink off
I2C_LCD_WriteControl(0x2A); //function set (extended command set)
I2C_LCD_WriteControl(0x79); //OLED command set enabled
I2C_LCD_WriteControl(0xD5); //set display clock divide ratio/oscillator frequency
I2C_LCD_WriteControl(0x70); //set display clock divide ratio/oscillator frequency
I2C_LCD_WriteControl(0x78); //OLED command set disabled
I2C_LCD_WriteControl(0x09); //extended function set (4-lines)
I2C_LCD_WriteControl(0x06); //COM SEG direction
I2C_LCD_WriteControl(0x72); //function selection B
I2C_LCD_WriteData(0x00); //ROM CGRAM selection
I2C_LCD_WriteControl(0x2A); //function set (extended command set)
I2C_LCD_WriteControl(0x79); //OLED command set enabled
I2C_LCD_WriteControl(0xDA); //SEG
I2C_LCD_WriteControl(0x10); //SEG
I2C_LCD_WriteControl(0xDC); //function selection C
I2C_LCD_WriteControl(0x00); //function selection C
I2C_LCD_WriteControl(0x81); //set contrast control
I2C_LCD_WriteControl(0x7F); //set contrast control
I2C_LCD_WriteControl(0xD9); //set phase length
I2C_LCD_WriteControl(0xF1); //set phase length
I2C_LCD_WriteControl(0xDB); //set VCOMH deselect level
I2C_LCD_WriteControl(0x40); //set VCOMH deselect level
I2C_LCD_WriteControl(0x78); //OLED command set disabled
I2C_LCD_WriteControl(0x28); //function set (fundamental command set)
I2C_LCD_WriteControl(0x01); //clear display
CyDelay(100u); //delay
I2C_LCD_WriteControl(0x80); //set DDRAM address to 0x00
I2C_LCD_WriteControl(0x0C); //display ON
CyDelay(100u); //delay
I have tried changing the COM SEG direction command (ENTRY SET MODE), and it changes the orientation, but never to the correct one.
I have also tried setting the REV bit in the FUNCTION SET command, but again, it never gets the correct orientation.
I have attached the schematic showing the connection of the display - there are pullups on the I2C lines.
Any idea as to what I might be doing wrong or missing?
Thank you.

-
Would it be possible to get a picture of what you are seeing?
0 -
photo
0 -
From the Photo it looks like the segments are going backwards.
Can you try sending a 0x2A (Function Set, RE = 1)
followed by the Entry mode set(0b000001XY) where y could be a 0 or 1, this should stop the mirroring on the display.0 -
The original initialization code posted above already included ENTRY MODE SET 0x06 (see line 12)
The photos posted below are using 0x04 and 0x05 for the ENTRY MODE SET value.0 -
Not sure what else I can try?
I have tried the ENTRY SET MODE as suggested with results posted in previous post.
I have also tried the REV instruction with no success.
Not sure where else to look. I have spent days on this problem.
Any help is much appreciated. Thank you.0 -
Hello Garry,
Would it be possible to send me a picture of the back of the display as well?
I would like to see the date code and the bonding of the OLED Glass to the PCB. I would like to confirm that these are connected properly as well.
I haven't been able to replicate this issue.
Has this occurred on multiple displays or have you only been able to test 1?0 -
Saurabh_B,
I am also having similar issues with NHD-0216CW-AB3 -- tried 2 modules.
Date code is 01 17 NHD_0216CW_AB2.
Are the SHLC, or SHLS signals, from the US2066 controller, available anywhere on the module PCB?
Thanks.0 -
Unfortunately the pins are not available to the end user.
They do come out to the PCB on pins 5 & 6 of the ribbon connector that soldered onto the back of the display.0 -
They do come out to the PCB on pins 5 & 6 of the ribbon connector that soldered onto the back of the display.
Thank you. That worked for me.0
Please sign in to leave a comment.
Comments
9 comments