displays

Hello to all.

I've got a 3.5 inch LCD TFT touchscreen, that should work, but just doesn't.
Once, it worked, from a bit of code I uncovered from the internet, but I pressed the reset button on the arduino, thinking it would restart, but it stopped working and has never worked since!
However, it does sometimes show some faint strange lines on screen, but nothing more really.
I have found a sketch diagnose_TFT_support, which tells me the screen id (0x9401) is not supported, and leads me to another sketch called LCD_ID_readreg, and tells me to copy the the info from the serial terminal into the arduino forum, which, annoyingly, I can't seem to do!

Any suggestions? (feel free to ask for any extra information).

Thank you.

Pressing the reset button on the Arduino would not cause your project to not work.

Provide a link to your touchscreen.

timmix81:
Hello to all.

I've got a 3.5 inch LCD TFT touchscreen, that should work, but just doesn't.
Once, it worked, from a bit of code I uncovered from the internet, but I pressed the reset button on the arduino, thinking it would restart, but it stopped working and has never worked since!
However, it does sometimes show some faint strange lines on screen, but nothing more really.
I have found a sketch diagnose_TFT_support, which tells me the screen id (0x9401) is not supported, and leads me to another sketch called LCD_ID_readreg, and tells me to copy the the info from the serial terminal into the arduino forum, which, annoyingly, I can't seem to do!

Any suggestions? (feel free to ask for any extra information).

Thank you.

Please read this message sequence about 0x9401

Does your display look like the video in #2174 ?
Is the glass screen cracked?

What country are you in?

David.

"Please read this message sequence about 0x9401

Does your display look like the video in #2174 ?
Is the glass screen cracked?

What country are you in?

David."

David, the glass screen is not cracked, and I am in the UK.

I'm pretty sure that the message sequence about 0x9401 is what I am getting in the serial monitor from my arduino when upload the LCD_ID_readreg sketch to my arduino mega 2560.

By the way, could you provide a link to #2174? (I'm not sure what it is).

Thank you for replying so promptly, and, as before, ask for more info if needed.

"Pressing the reset button on the Arduino would not cause your project to not work.

Provide a link to your touchscreen."

Here's a link to where I bought the touchscreen (mine is very slightly different, I'm not sure if it matters):

Thanks for replying!

I gave you a link to message #2171;in a thread. There is a link to a video in #2174 of the same thread. i.e. 3 messages after the message #2171.

Please read the sequence between fadec and myself.

Your Ebay link is a typical load of rubbish with typos and incorrect details.
As long as your pcb has similar pin names and components as the photos, I can assume it is a regular Mcufriend Uno shield.

Please let me know how you get on with tft.begin(0x9090);
Then I can post a test Branch on GitHub if necessary.

David.

Thanks for the help!

The screen is working, but only on one side, (this is with tft.begin(0x9090):wink: and the other is filled with weird scrolling lines and you can only see anything by looking from a certain angle.

Have you any suggestions about what I can do?

Sorry! Accidentally added the wink emoji!

Does your screen behave exactly like the video in #2174 ?

I am a litle worried that you do not know how to copy-paste from the Serial Terminal.
Do you know how to edit a file?

If you are unsure please ask.
Edit MCUFRIEND_kbv.cpp: change these lines

    case 0x9090:                //BIG CHANGE: HX8357-D was 0x8357
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN | READ_24BITS;
      common_8357:
        static const uint8_t HX8357D_regValues[] PROGMEM = {
            0xB0, 1, 0x00,              // unlocks E0, F0
        };

to these new lines:

    case 0x9090:                //BIG CHANGE: HX8357-D was 0x8357
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN | READ_24BITS;
      common_8357:
        static const uint8_t HX8357D_regValues[] PROGMEM = {
            TFTLCD_DELAY8, 1,     // dummy values to provide non-empty array
        };

try this with your tft.begin(0x9090); line

Can you explain your "knowledge" or experience with C or C++.

David.

Hello.

My screen shows something a bit like the video, but the screen is very slightly different,
and yes, I haven't yet found out how to copy from the serial monitor.
But I'm not completely sure what you mean by:

Edit MCUFRIEND_kbv.cpp: change these lines

case 0x9090: //BIG CHANGE: HX8357-D was 0x8357
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN | READ_24BITS;
common_8357:
static const uint8_t HX8357D_regValues[] PROGMEM = {
0xB0, 1, 0x00, // unlocks E0, F0
};

to these new lines:

case 0x9090: //BIG CHANGE: HX8357-D was 0x8357
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN | READ_24BITS;
common_8357:
static const uint8_t HX8357D_regValues[] PROGMEM = {
TFTLCD_DELAY8, 1, // dummy values to provide non-empty array
};

try this with your tft.begin(0x9090); line

Do you mean upload the changed code to my arduino, or editing the library itself?
And, answering your other question, I'm a relative beginner on arduino, but I have improved, e.g at first my digital inputs would not work, and now I know how to use them properly.
Thank you.

You seem to do a pretty competent job of typing a message here.

Copy-Paste from the Serial Terminal is just a matter of placing your mouse on the text and selecting an area to "copy" e.g. click at the "start" and drag your mouse to the end of the area.
Press ctrl-C to copy. ctrl-V to paste into your message.

As a tip. It is often easier to select the whole Serial Terminal with ctrl-A. Copy with ctrl-C

When pasting code it is wise to use the "CODE" icon at the top-left of your Reply screen.
Do some experimenting. Click Preview Box to see how it looks.

Using a Text Editor like Notepad++ will also involve copy-paste.
I would expect ALL Linux text editors to work nicely.
Of course Microsoft programs like Notepad do not always understand line-endings.

When you right-click on MCUFRIEND_kbv.cpp in the File Explorer, choose a suitable editor with the "Open with" item.

Then you can search with ctrl-F for case 0x9090:
Identify the lines to change. It is only one line that is different.
Remember to save the modified file back to your PC.

Compile your Arduino sketch in the normal way. It will rebuild the library when it notices the file was changed.

David.

Hi.

I tried what you said, with the modifying of the library, but nothing changed!
However, here's the output from the serial monitor when I upload the LCD_ID_readreg sketch to my arduino (Which I think is similar to the code in the message sequence between you and fadec):

Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 94 01 Manufacturer ID
reg(0x0009) 00 00 61 00 00 Status Register
reg(0x000A) 08 08 Get Power Mode
reg(0x000C) 66 66 Get Pixel Format
reg(0x0061) 00 00 RDID1 HX8347-G
reg(0x0062) 00 00 RDID2 HX8347-G
reg(0x0063) 00 00 RDID3 HX8347-G
reg(0x0064) 00 00 RDID1 HX8347-A
reg(0x0065) 00 00 RDID2 HX8347-A
reg(0x0066) 00 00 RDID3 HX8347-A
reg(0x0067) 00 00 RDID Himax HX8347-A
reg(0x0070) 00 00 Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00 RD_DDB SSD1963
reg(0x00B0) 00 00 RGB Interface Signal Control
reg(0x00B4) 00 00 Inversion Control
reg(0x00B6) 00 00 00 00 00 Display Control
reg(0x00B7) 00 00 Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 00 00 Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 00 Panel Control
reg(0x00D0) E0 E0 01 Power Control
reg(0x00D2) E0 E0 01 E0 E0 NVM Read
reg(0x00D3) 00 00 94 01 ILI9341, ILI9488
reg(0x00D4) E1 E1 01 E1 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 94 94 RDID2
reg(0x00DC) 01 01 RDID3
reg(0x00E0) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-P
reg(0x00E1) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-N
reg(0x00EF) 00 00 00 00 00 00 ILI9327
reg(0x00F2) 00 00 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control

Is there anything else I can try?

Thank you.