Is ILI9341 correct?

Moderators: mdrjr, odroid

Is ILI9341 correct?

Unread postby Kabron » Fri Jul 13, 2018 9:41 pm

Code: Select all
 
  GO.begin();
  GO.lcd.setRotation(0);
  GO.lcd.fillScreen(TFT_BLACK);
  GO.lcd.println("Hello World!!!");

Draws mirrored image. Google mention that there may be wrong models of ILI9341.

Is there a workaround?
User avatar
Kabron
 
Posts: 48
Joined: Sun Feb 24, 2013 9:01 pm
languages_spoken: english
ODROIDs: U2, ODROID-GO

Re: Is ILI9341 correct?

Unread postby Kabron » Fri Jul 13, 2018 11:06 pm

I do not know WTF they did with display drivers, but at the moment this works correctly:
Code: Select all
  GO.lcd.setRotation(0);
  GO.lcd.writecommand(ILI9341_MADCTL); // Memory Access Control
  GO.lcd.writedata(0x48);
User avatar
Kabron
 
Posts: 48
Joined: Sun Feb 24, 2013 9:01 pm
languages_spoken: english
ODROIDs: U2, ODROID-GO

Re: Is ILI9341 correct?

Unread postby lsc1117 » Sat Jul 14, 2018 11:37 am

Hi Kabron,

Try "GO.lcd.setRotation(7)", then you can see correct screen.
https://github.com/hardkernel/ODROID-GO/blob/master/src/odroid_go.cpp
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Is ILI9341 correct?

Unread postby lsc1117 » Sat Jul 14, 2018 11:39 am

lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Is ILI9341 correct?

Unread postby Kabron » Sat Jul 14, 2018 5:21 pm

None of 0-7 choices gives me desired result. Most of them are mirrored.
I guess everybody agreed that ODROID-GO display drivers have to have maximum compatibility with M5STACK.
Why not do so?
User avatar
Kabron
 
Posts: 48
Joined: Sun Feb 24, 2013 9:01 pm
languages_spoken: english
ODROIDs: U2, ODROID-GO

Re: Is ILI9341 correct?

Unread postby odroid » Sat Jul 14, 2018 9:34 pm

I think M5STACK has 90 degree of LCD orientation while GO has 270 degree.
When we made the first prototype in last October, it was 270 degree of rotation.
Image
User avatar
odroid
Site Admin
 
Posts: 28849
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Is ILI9341 correct?

Unread postby Kabron » Wed Jul 18, 2018 7:45 pm

IMHO in ODROID-GO we have a deal with a display modification.
Changing initialization strings (in Display.cpp) from:
Code: Select all
    writecommand(ILI9341_DFUNCTR); // Display Function Control
    writedata(0x08);
    writedata(0x82);
    writedata(0x27);


to
Code: Select all
    writecommand(ILI9341_DFUNCTR); // Display Function Control
    writedata(0x0A);
    writedata(0xA2);
    writedata(0x27);


solves all the problems
User avatar
Kabron
 
Posts: 48
Joined: Sun Feb 24, 2013 9:01 pm
languages_spoken: english
ODROIDs: U2, ODROID-GO

Re: Is ILI9341 correct?

Unread postby Kabron » Wed Jul 18, 2018 9:55 pm

In support of my words, odroid-go-firmware contains the correct sequence of initialization of the display. File odroid_display.c:
{0xB6, {0x0A, 0xA2}, 2}, // Display Function Control

As for the Arduino library, they simply dumbly copied it from M5STACK
User avatar
Kabron
 
Posts: 48
Joined: Sun Feb 24, 2013 9:01 pm
languages_spoken: english
ODROIDs: U2, ODROID-GO

Re: Is ILI9341 correct?

Unread postby lsc1117 » Fri Jul 20, 2018 1:49 pm

@Kabron

Thank you.
I fixed the Display Function Control values with "0x0a 0xa2 0x27".

Now it works well.
https://github.com/hardkernel/ODROID-GO/commit/b2539a0524bb7984ab3e0c17f2f60f1e0f0ec72d
lsc1117
 
Posts: 92
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english


Return to General Chat

Who is online

Users browsing this forum: No registered users and 1 guest