Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - garryg

Pages: [1]
1
OLEDs / Re: Characters Mirrored on NHD-0420CW Display
« 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.

2
OLEDs / Re: Characters Mirrored on NHD-0420CW Display
« 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.




3
OLEDs / Re: Characters Mirrored on NHD-0420CW Display
« on: September 13, 2017, 12:27:07 PM »
Photo attached

4
OLEDs / 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.



Pages: [1]