Is ILI9341 correct?

Post Reply
User avatar
Kabron
Posts: 48
Joined: Sun Feb 24, 2013 9:01 pm
languages_spoken: english
ODROIDs: U2, ODROID-GO
Contact:

Is ILI9341 correct?

Unread post by 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
Contact:

Re: Is ILI9341 correct?

Unread post by 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);

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

Re: Is ILI9341 correct?

Unread post by 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 ... oid_go.cpp

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

Re: Is ILI9341 correct?

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


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

Re: Is ILI9341 correct?

Unread post by 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
odroid
Site Admin
Posts: 29651
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Is ILI9341 correct?

Unread post by 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
Kabron
Posts: 48
Joined: Sun Feb 24, 2013 9:01 pm
languages_spoken: english
ODROIDs: U2, ODROID-GO
Contact:

Re: Is ILI9341 correct?

Unread post by 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
Contact:

Re: Is ILI9341 correct?

Unread post by 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

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

Re: Is ILI9341 correct?

Unread post by 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 ... 1e0f0ec72d

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests