3.95" LCD Module for Mega2560 - Only Half Screen

I have 3.95" LCD Module for Mega2560. The packaging says it has a 9488 driver. I am connecting it directly to a Mega 2560 board. Every example I load only displays correctly for the first (top) half of the screen. Also the touchscreen demo works correctly for up and down axis, but left and right are reversed.

I'm using the LCDWiki examples for testing. I've set the sketch to use 16bit mode for ILI9488 driver.

Sorry if I am not providing sufficient information, I am very new to Arduino and LCDs.

The display is the same as this one below.

image

I have read some posts discussing R5 and R4 settings. My board has R5 missing. Do I need to bridge this to enable 16 bit?

Hi, @neilsonwheels
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

This will help with advice on how to present your code and problems.

Thanks for the image of your display.
A copy of your code would greatly help to fix your problem.

Tom.... :smiley: :+1: :coffee: :australia:

It is always best to provide a link to the actual display that you have bought.
However I can identify the board from your photo.

The Mega2560 Shield plugs into the Arduino MEGA2560 header sockets as Nature intended.

If you want to use in 16-bit mode, you must change R4, R5 with a soldering iron. Run the LCDWIKI examples for 16-bit ILI9488.

It comes out of the box in 8-bit mode. Run the LCDWIKI examples for 8-bit ILI9488.

You can use the display with MCUFRIEND_kbv as a SPECIAL e.g.
USE_SPECIAL and USE_MEGA_16BIT_SHIELD and tft.begin(0x9488);
or
USE_SPECIAL and USE_MEGA_8BIT_PORTC_SHIELD and tft.begin(0x9488);

Note that this display has a design fault which means that it is write-only. Hence tft.readID() will not work and you have to force tft.begin(0x9488);

David.

Thanks David, I made the R4, R5 mod, however I am still only getting half the screen working with the LCDWIKI and MCUFRIEND examples. It doesn't appear to be any different than before I made the mod.

With the MCUFRIEND configuration, I have used the special method. I'm not entirely sure whether I have set everything correctly. I am confused about the tft.begin sections.

For example, in the graphicstest_v25.cpp file I have the following code:

#endif
    if (g_identifier == 0x00D3) g_identifier = 0x9481; // write-only shield
    if (g_identifier == 0xFFFF) g_identifier = 0x9341; // serial
    //    g_identifier = 0x7789;                             // force ID
    tft.begin(0x9488);

Can you confirm that this is correct?

Thanks for your help, I am eager to play with this display.

Neil

I don't know what the graphicstest_v25.cpp file is.

You generally read the ID. If tft.readID() returns 0xD3D3 it means you have a write-only display.
Most other ID values refer to a real-life ID that was successfully read from the controller chip.

In your particular case you are forcing 0x9488

I strongly advise you to read the "how_to" file.
Edit the "shield.h" and "special.h" files.
Edit and Run graphictest_kbv.ino from the examples with tft.begin(0x9488);

Ask if you don't understand.

David.

1 Like

Thanks David, I have been following the how to.
Can you tell me where I make the tft.begin(0x9488); entry?
That part I do not understand.

After making all of the changes to the utility files, the Sketch does not compile.

The how_to says:

17. If you do not have a standard Uno Shield, you can add a SPECIAL to the mcufriend_special.h
    Edit mcufriend_shield.h:  #define USE_SPECIAL
    Edit mcufriend_special.h: e.g. #define USE_MEGA_16BIT_SHIELD
    If your "special" is write-only,  the library can not read the ID.  It always returns 0xD3D3
	
18. Please run LCD_ID_readreg.ino to verify your non-standard wiring.  Paste the defines to a Forum message.

19. OPEN-SMART Shields have different wiring to regular Uno Shields:
    Edit utility/mcufriend_shield.h:  #define USE_SPECIAL
    Edit utility/mcufriend_special.h: #define USE_OPENSMART_SHIELD_PINOUT_xxx e.g. USE_OPENSMART_SHIELD_PINOUT_MEGA
    Edit MCUFRIEND_kbv.cpp:           #define SUPPORT_8352B

In your case you just need:

    Edit utility/mcufriend_shield.h:  #define USE_SPECIAL
    Edit utility/mcufriend_special.h: #define USE_MEGA_16BIT_SHIELD

Example sketches should compile without error. However most of the examples "guess" 0x9481 if readID() returns 0xD3D3 e.g.

    uint16_t ID = tft.readID();
    //    if (ID == 0xD3D3) ID = 0x9481; // write-only shield
    if (ID == 0xD3D3) ID = 0x9488; // USE THIS FOR YOUR SHIELD
    tft.begin(ID);

So you need to make sure that all of your sketches use 0x9488

Personally, I test the ID. Which means that the same sketch will work on a proper read-write Uno shield.

If you have compile errors I suggest that you re-install MCUFRIEND_kbv via the IDE Library Manager and re-edit the two utility files.

David.