3.5 "TFT ILI9341 how to display BMP files

Welcome

I have a 3.5 "display on the ILI9488 or ILI9341 controller
it works probably on both I'm not sure because the test program is probably on ILI9341 and when I was buying it was written ILI9488 so I do not know how it is anymore but it works the most important
The display has been running on the test code since MCUFRIEND_kbv
and now the question of how the program should look like it would show me all the bitmaps from the SD card without giving the names of bmp files in the program simply has to fly all the bmps from the card no matter how they are name
I would ask for some help in the code
adds two codes that work one displays the text and the other one bmp but after the names (processed a bit from the test)
Can someone write me the simplest display of all files on the card without giving names if it is possible at all
i run display BMP one by one but colors is no goood for example blue is red , green is blue
how to fix this ?

Display TFT_Ebay.zip (219 KB)

ILI9488_BMP.zip (3.56 KB)

Your ZIP shows an obsolete MCUFRIEND_kbv library (v2.9.1)
Your LCD_ID_readreg report shows that you have an Ilitech ILI9486 controller

  1. Leave the IDE
  2. Delete the MCUFRIEND_kbv directory from your user libraries folder
  3. Start IDE
  4. Sketch -> Include Library -> Manage Libraries...
  5. Install MCUFRIEND_kbv via the IDE Library Manager

MCUFRIEND_kbv v2.9.7 has examples for displaying BMP on Uno and not-Uno.

If you have a problem, please ask on this Forum.

David.

ok David
i install whole new arduino 1.8.5 install ass well MCUFRIEND_kbv via the IDE Library Manager
nothing change still colors is not right
any idea what is wrong?

What is wrong with colours? Red instead of Blue? Black instead of White?

Post the results of any diagnostics.

exactly Red instead of Blue
but only on BMP if i print some text i think is ok
but bmp is Red instead of Blue

I provide graphictest_kbv example.
Run this sketch and make careful notes. Wrong Colours, directions, ...

It is incredibly simple to solve a colour problem. But only if I have accurate information.

Please check the colours of your BMP files on your PC.
If you have an unusual BMP format, please ZIP up the problem BMP file(s) and attach to your message.

David.

look mate

You have an ILI9486 controller running on an Arduino MEGA2560.
It shows inverted colours. i.e. White instead of Black. Magenta instead of Green.

Panels vary.
You can either call tft.invertDisplay(true) in every sketch
Or edit MCUFRIEND_kbv.cpp:

    case 0x9486:
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS;  // remove REV_SCREEN attribute

Hint search for case 0x9486

David.

sory but i not understand what to do with this line

case 0x9486:
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS; // remove REV_SCREEN attribute

Look mate.

ok is done
thx David for help
Colors is right now

My ILI9486 shield is a Red 3.5 inch Mcufriend.
Please post a link to your actual shield.

If the Blue 3.5 inch shields are consistently inverted colours, it would be helpful to know.
Does anyone have a Red 3.5 inch with inverted colours?

The BMP example shows how to show every BMP in a directory. Which was your original question.

David.

i have red pcb
i change this file like u said and work good
thx David for help

My Red shield is about 3 years old. If current Blue and Red shields are all like yours, I will change the default.

I can't please all of the people all of the time. But most people most of the time would be worthwhile.

David.

i have red PCB is maybe half year old

Can anyone tell me how and where to change the pin configuration from D0 to D7 in library?

God gave you a Shield. And the convenience of plugging the male pins into the female sockets on an Arduino.

Why would you want to change anything?

David.

i want project my own PCB

If you want to make your own pcb, you might just as well put the data bus on PORTA.
e.g. like the special USE_MEGA_8BIT_PROTOSHIELD

If you are prepared to make your own pcb, it would be worth using a proper 3.3V MCU instead of the ATmega2560.

David.

i hear something i can use this lib mcufriend_special_2.h
i try but arduino give me error compilation