Go Down

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

joeygbsn

Hey having some trouble with our mcufriend uno display running on a mega2560. When my partner initially tested the library all examples worked fine and he was drawing on the display and everything. After a switch was made to a second mega the display only gives a white screen. Now we can't get anything but a white screen on either mega. The LCD_ID_readreg was not run when the display was working but here is the output when it is run now and it seems to be giving an ID of 0x8080 which is not on your list of ID's.
Code: [Select]
reg(0x0000) 80 80       ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 80 80 80 80 Manufacturer ID
reg(0x0009) 80 80 80 80 80      Status Register
reg(0x000A) 80 80       Get Power Mode
reg(0x000C) 80 80       Get Pixel Format
reg(0x0061) 80 80       RDID1 HX8347-G
reg(0x0062) 80 80       RDID2 HX8347-G
reg(0x0063) 80 80       RDID3 HX8347-G
reg(0x0064) 80 80       RDID1 HX8347-A
reg(0x0065) 80 80       RDID2 HX8347-A
reg(0x0066) 80 80       RDID3 HX8347-A
reg(0x0067) 80 80       RDID Himax HX8347-A
reg(0x0070) 80 80       Panel Himax HX8347-A
reg(0x00A1) 80 80 80 80 80      RD_DDB SSD1963
reg(0x00B0) 80 80       RGB Interface Signal Control
reg(0x00B4) 8C 8C       Inversion Control
reg(0x00B6) 82 82 88 88 88      Display Control
reg(0x00B7) 80 80       Entry Mode Set
reg(0x00BF) 80 80 80 80 80 80   ILI9481, HX8357-B
reg(0x00C0) C4 C4 C4 90 90 80 80 80 80  Panel Control
reg(0x00C8) 80 80 80 80 80 80 80 80 80 80 80 80 80      GAMMA
reg(0x00CC) 80 80       Panel Control
reg(0x00D0) 80 80 80    Power Control
reg(0x00D2) 80 80 80 80 80      NVM Read
reg(0x00D3) 80 80 80 80 ILI9341, ILI9488
reg(0x00D4) 81 81 D3 90 Novatek ID
reg(0x00DA) 80 80       RDID1
reg(0x00DB) 80 80       RDID2
reg(0x00DC) 80 80       RDID3
reg(0x00E0) 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80     GAMMA-P
reg(0x00E1) 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80     GAMMA-N
reg(0x00EF) 80 80 80 80 80 80   ILI9327
reg(0x00F2) F1 F1 D4 A5 A4 9E C4 90 82 AC AC B2 Adjust Control 2
reg(0x00F6) 80 80 BA 80 Interface Control


Not sure if our display is broken now or what but thanks for any information you can give us.

david_prentice

What ID did the screen have (when it worked) ?
Is it an Open-Smart pcb or a Mcufriend pcb?

If it is Open-Smart you need to enable the appropriate SPECIAL.

Plug the Uno shield into a Uno.   Does it work?

David.

joeygbsn

It is a mcufriend display. The serial monitor wasn't open when it worked so unfortunately we didn't get the ID then. Assuming 0x8080 is not a valid ID? I will put the shield on an uno tonight and report the findings.

joeygbsn

Does not work on an uno. Same id of 8080 when running readreg sketch and graphicstest with just a white screen.

david_prentice

It sounds like you have killed it.    There is no controller that matches your LCD_ID_readreg output.
Only you know what you have done to it.

You can try tft.begin(0x9329) but I suspect it just needs a burial.

David.

p.s.   the graphictest_kbv sketch reports the ID on the Adafruit_tests screen.   Obviously only any good before you killed it.

MaTTaX

Hi,

I need some help, I bought a 3.5" mcu friends display, and I have some problem.
I have mirrored screen on both axis, and the collors are wierd, I think it inverted, but if I invert the colors, I have still some problem. Like the red and the blue collors are not right.

Can someone help me?

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 80 00   Manufacturer ID
reg(0x0009) 00 00 00 00 00   Status Register
reg(0x000A) 08 08   Get Powsr 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) 0C 0C   Inversion Control
reg(0x00B6) 02 02 08 08 08   Display Control
reg(0x00B7) 00 00   Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00C0) 44 44 44 10 10 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) 00 00 00   Power Control
reg(0x00D2) 80 80 00 00 00   NVM Read
reg(0x00D3) 00 00 00 00   ILI9341, ILI9488
reg(0x00DA) 00 00   RDID1
reg(0x00DB) 80 80   RDID2
reg(0x00DC) 00 00   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) F1 F1 54 A5 24 1E 44 90 02 2C 2C 32   Adjust Control 2
reg(0x00F6) 00 00 3A 00   Interface Control

david_prentice

I am not a a PC.   It looks like a Himax HX8357-D controller.  And you have a very OLD library version.

Goto the Library Manager and upgrade the MCUFRIEND_kbv library.
Please report back with the ID

David.

Edit.   I checked on the PC.  It is actually a Novatech NT35310.   From memory, the first ones that appeared on Ebay were set up for 8080-16 interface.   Please post a photo of bad coloured screen from graphictest_kbv sketch.   
I suggest that you ask for a refund unless you are prepared to do some SMD soldering.


MaTTaX

Thank you for helping David!

I updated the library, this is the result:

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 80 00   Manufacturer ID
reg(0x0009) 00 00 00 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) 0C 0C   Inversion Control
reg(0x00B6) 02 02 08 08 08   Display Control
reg(0x00B7) 00 00   Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00C0) 44 44 44 10 10 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) 00 00 00   Power Control
reg(0x00D2) 80 80 00 00 00   NVM Read
reg(0x00D3) 00 00 00 00   ILI9341, ILI9488
reg(0x00D4) 01 01 53 10   Novatek ID
reg(0x00DA) 00 00   RDID1
reg(0x00DB) 80 80   RDID2
reg(0x00DC) 00 00   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) F1 F1 54 A5 24 1E 44 90 02 2C 2C 32   Adjust Control 2
reg(0x00F6) 00 00 3A 00   Interface Control

The library update fixed everything, every function is working perfectly, big thanks David!


david_prentice

If everything is working ok,  it means that the Ebay vendors have fixed the 8080-16 vs 8080-8 interface problem.

It always amazed me that they put the original 8080-16 versions on the market in the first place.

The NT35310 works very well (with the correct interface).

David.

david_prentice

A user has reported that his SPFD5408 shield has visible scan lines on the display.
Here is a youtube video
Here is another youtube video

Although Ebay vendors often call these 2.4" shields "SPFD5408" very few contain genuine Orise SPFD5408.
Are there any other ID=0x5408 owners with a "bad" display?

David.

Bricki

Hi everyone,

I've built a small gauge with a Teensy 3.2 and a standard 2.4" TFT, connected via SPI to the Teensy board. Due to limitation in direct sunlight, I ordered a Newhaven Display 763-24240320CFCSXNF, equipped with a ST7789S controller. Thanks to David I found this library to (hopefully) get this combination running.

Here's my question: I'll wire the display like a standard shield to the Teensy board (LCD data D2-D9, LCD control A0-A4, no touch, no SD card necessary). Do I have to comment or uncomment something to get the examples running?

As you can see from my question, I don't know really what I'm doing on the hardware library side :-)

Thanks
Peter

Go Up