Author Topic: Characters Mirrored on NHD-0420CW Display  (Read 368 times)

garryg

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Characters Mirrored on NHD-0420CW Display
« on: September 13, 2017, 03:23:09 AM »
Hi,

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.



Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #1 on: September 13, 2017, 09:05:59 AM »
Would it be possible to get a picture of what you are seeing?

garryg

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #2 on: September 13, 2017, 12:27:07 PM »
Photo attached

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #3 on: September 13, 2017, 03:53:40 PM »
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.

garryg

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #4 on: September 14, 2017, 02:21:53 AM »
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.




garryg

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #5 on: September 14, 2017, 09:52:30 PM »
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.

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #6 on: September 18, 2017, 10:30:24 AM »
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?

Lou

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #7 on: October 24, 2017, 05:46:54 PM »
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.


Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #8 on: October 25, 2017, 04:00:17 PM »
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.

Lou

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Characters Mirrored on NHD-0420CW Display
« Reply #9 on: October 26, 2017, 06:05:22 PM »
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.


 

Blank Display on NHD‐C0220BiZ‐FS(RGB)‐FBW‐3VM

Started by SteveCBoard Character LCDs

Replies: 3
Views: 4553
Last post May 13, 2014, 12:04:36 AM
by SteveC
NHD‐C12864A1Z‐FSW‐FBW‐HTT display clears after draw

Started by EdAverillBoard Graphic LCDs

Replies: 6
Views: 5685
Last post November 07, 2014, 08:25:20 AM
by Michael_L
NHD‐4.3‐480272EF‐ATXL#‐CTP | FAN5333 | BBB | Nothing on the Display

Started by Alias_AliasBoard TFTs

Replies: 1
Views: 3393
Last post September 25, 2015, 03:09:24 PM
by Paul_B
Arduino LCD library not working with newhaven display NHD‐0420H1Z‐FL‐GWB-3V3

Started by c2hollowBoard Character LCDs

Replies: 9
Views: 8795
Last post July 10, 2014, 08:46:06 AM
by Michael_L
NHD-0420DZW-AG5 - Display "sometimes" shows only 2 lines

Started by stylonurusBoard OLEDs

Replies: 5
Views: 5568
Last post June 18, 2014, 10:09:49 AM
by Michael_L