Go Down

Topic: MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields (Read 336553 times) previous topic - next topic


After I observe the flexible part of the lcd, it looks like this lcd uses a 8080 9 BIT parallel configuration.
IM3 => GND
IM2 => IOVCC via unknown chip
IM1 => GND via unknown chip
IM0 => IOVCC via unknown chip

the unknown chip is 6 pin ic with ground plane,
and have marking code

IM2 =|""""""""|= IOVCC
IM0 =|          |= IOVCC
IM1 =| o        |= GND

However, if the IC i remove, and its IMx pins I connect directly to the corresponding path.
lcd has unknown ID or cannot be read.


Regarding unlock.   Many devices use reg(0xC0).   Normally 0x00 to unlock.
If the device uses another location like Himax,  you have to know the key before you start.

Regarding the ID detection.   Yes, it is fine to remove that FFFF test.   If anyone owns a R61526 I can show them how to use the R61526 EEPROM.

I would still like to see one clear photo of a Penguin screen e.g. Portrait.   (BLUE)

You can change attributes for 0x2910 e.g. REV_SCREEN, INVERT_SS, INVERT_RGB, ... to get something readable

When I can see a clear photo,  I can probably suggest different values in 0x3A register.

Regarding the Pakistani gentleman.   Yes,  that is the one.   Picture is 7 years old.    You can try emailing him.

On a ILI9341 IM# = 0.0. could be 8080-8 (0000), 8080-16 (0001), 3-wireSPI (0101)

My money is on 8080-8 or 8080-16



Dear David,
I know I don't have a picture of cute girl in my avatar, but could I still get an answer? I don't mind if it's no.
I would just like to know, so if you are not interested I can devote my time and interest elsewhere.
Thank you.


My apologies.   I missed your post #2383.

Your photo with 0x9320 require INVERT_SS attribute
If 0x9325 shows correct text but in reverse,  you remove the REV_SCREEN attribute.

The easiest solution is to use tft.begin(0x9325) and add tft.invertDisplay(1) to setup() in most sketches.

Since the graphictest_kbv example deliberately has a "INVERT_DISPLAY" screen,  you need to  put tft.invertDisplay(1) in the loop() instead of setup()

What ID is reported in the Adafruit_Tests report screen?
What is reported in SOFTWARE SCROLL?  e.g. readPixel()) error   

Are you happy with editing library files?


p.s. I don't think that tongbajiel looks like that photo.    I think that he is male and comes from Indonesia.


No worries. It's understandable that beautiful people like tongbajiel get all the attention, and ugly and dirty old men like me are occasionally overlooked.:P

To answer to your questions.
readPixel() read as BRG

In Adafruit test screen
ID: 0x1

I have done some fiddling my own and got the text mirrored. I made these changes to the MCUFRIEND_kbv::begin();

Code: [Select]

#ifdef MDM63
 case 0x9999:
      _lcd_capable = 0 | READ_BGR | REV_SCREEN | MIPI_DCS_REV1;
              goto common_9320;


Now the image is correct, but it still has issues to initialize sometimes. It works every time I upload a sketch, but sometimes after reset or power off (disconnecting USB cable) if fails to initialize. It looks like it's trying and the screen flashes black couple of times very rapidly, but it stays white.

Could this be because some timing values in the registers are not set correctly? I don't think there is anything physically wrong with the display. I have tested this with three different Arduino Uno's, with same behavior, so I think I can rule the Arduino's out of the equation.

"Are you happy with editing library files?"
Editing libraries with text editor? I would not go as far and say it makes me "happy", but I can manage. ;) To be clear, I have some experience in coding, but I have absolutely no experience on TFT displays and their inner workings. So basically I can code some and google plenty, and I am willing to learn.


Well,   you have managed to edit the MCUFRIEND_kbv.cpp file successfully.

It is VERY unlikely that it is MIPI compliant.

I would expect:
Code: [Select]

    case 0x0001:
        _lcd_capable = 0 | REV_SCREEN | READ_BGR | INVERT_SS;
        goto common_9320;

There are several legacy controllers with similar Power Control registers and READ_BGR.   e.g. R61580 and UC8230

I would choose whichever controller starts up the most reliably and shows a steady display.
It is easy enough to alter the attributes to get the directions and colours correct.

Check Portrait is correct.  ribbon at bottom of screen.
Check colours are correct
Check directions of text.
Check directions of vertical scroll.   (no,  a 9320 can not Band Scroll)
Check Software Scroll
Check Invert Display

You can go through the checklist.   Or post a video.

Then you can test the readPixel example.   Followed by calibrating your Touch Panel.



Thanks. I will do as you suggest. I will let you know if I have any success. This might take a while as I am very busy for several weeks. All work no play makes Jack a dull boy. :smiley-confuse:


Hi, get the same register results as mdm63 but trying the id 0x9320 or 0x9325 still gives white screen.


I have no idea what your controller is.   An ID=0x0001 is pretty unlikely.   But mdm63 seemed to get a response for 0x9320 and 0x9325 even if the Power Registers need adjusting for optimum picture.

I would follow #2382.   Ebay or AliExpress should refund your money because your item does NOT work.

If the shop asks its supplier what controller is mounted,   I will add support for it.
It costs the shop nothing to ask its supplier.   It costs the shop a lot of money to refund every customer that received this display.

What country are you in?


Go Up