Go Down

Topic: [SOLVED] Cannot identify 2.4 inch TFT driver chip (Read 1 time) previous topic - next topic

stevestrong

Feb 22, 2017, 01:15 am Last Edit: Feb 25, 2017, 06:01 pm by stevestrong
Hello,

I have problems identifying one of my 2.4 inch touch TFT board.
Running the "LCD_ID_readreg.ino" from David sketch gives the following serial output:

Code: [Select]
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 00 00 Manufacturer ID
reg(0x0009) 00 00 61 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) 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) 00 00 00 Power Control
reg(0x00D2) 00 00 00 00 00 NVM Read
reg(0x00D3) 00 00 00 00 ILI9341, ILI9488
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 00 00 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) 28 94 03 08 08 10 00 15 48 00 07 00 Adjust Control 2
reg(0x00F6) 01 01 03 00 Interface Control

Any hint what kind of controller it can be?

Thanks in advance.

david_prentice

#1
Feb 22, 2017, 09:55 pm Last Edit: Feb 22, 2017, 09:57 pm by david_prentice
@Steve,

I have exactly the same controller.   I have no idea who makes it.   MCUFRIEND_kbv calls it ID=0x0000 and initialises "similar" to an ILI9341.   You just need to set some bits in reg(0xF6)

It is a MIPI-style controller that behaves quite differently to most others.
For example.   Most controllers require a dummy byte whenever you read most registers.   (except for status regs like 0x0B, 0x0C, ...)
This controller will read back exactly what you write to it.  i.e. no dummy is needed.
All the Manufacturer registers seem to be in the 0xF0-0xFE address range.

I will send you a sketch by PM.   Probably tomorrow.

David.

stevestrong

David, thank you a lot for your support, I could get it working with your lib using ID=0x0000, the graphictest shows acceptable pictures.

But it would still be interesting to know more about the controller type.
As reference, this is where I purchased from: 2.4 inch TFT display for UNO

david_prentice

#3
Feb 24, 2017, 06:46 pm Last Edit: Feb 24, 2017, 06:47 pm by david_prentice
Yes,   I would love to know what make the controller is.    And how it manages to read back registers without a dummy read first.

When did you buy your shield?
I bought my one at least a year ago.

Your link seems to show recent purchases.    It amazes me how punters accept wrong colours,  bad packing,  ... mendacious descriptions.

I support a genuine SPFD5408.   Many websites claim spfd508 and different pinouts.    99% of the time the item does not match the description on these sites.

David.

stevestrong

#4
Feb 24, 2017, 07:30 pm Last Edit: Feb 24, 2017, 07:46 pm by stevestrong
Me, I bought it in September last year, but that time it was not specified the controller type (spfd5408).
And I tried to begin with that ID but the picture was not that good as for ID=0x0000, it was mirrored and software scrolling did not work.

So I will stick to ID=0x0000.

Btw, can you please show me exactly which settings will be loaded in begin(), on which line number in "MCUFRIEND_kbv.cpp"? Because I cannot see any case for ID=0x0000 in the function begin(). And I would try those settings in my project, using only my own lib.

EDIT
I must be blind, it is actually on lines 831-832 where the ID is set to 0x9341 in case of zero value.

david_prentice

#5
Feb 24, 2017, 08:21 pm Last Edit: Feb 24, 2017, 08:25 pm by david_prentice
To be honest,  the Mystery controller has a power up default for (0x00F6) as 01 01 03.
The begin(0x0000) does:
Code: [Select]

            0xF6, 3, 0x09, 0x01, 0x03,  //Interface Control needs EXTC=1 RM=0, RIM=1


In fact it will work just fine with 01 01 03.   And the attributes are pretty basic:  REV_SCREEN | READ_BGR;

So I could just use a separate case 0x0000: and it would be sensible default.
And the default table8[ ] could just be:  {  TFTLCD_DELAY8, 1, }

table8[ ] must have at least one entry.   reg(0xF6) might be different on another controller.
Incidentally,  09 01 03 works.  01 01 03 works.  01 01 02 works.  01 01 01 works.  xx xx 00 fails on the Mystery controller.

OTOH,   I believe in identifying and using the correct ID.   Traditionally,  begin() is a void method.    It would be a good idea (tm) to make it boolean.

David.

stevestrong

#6
Feb 25, 2017, 05:33 pm Last Edit: Feb 25, 2017, 06:00 pm by stevestrong Reason: Solved
Managed to get it run with my own lib.
Running the original Adafruit graphicstest results in this benchmark:
Code: [Select]
Benchmark                Time (microseconds)
Screen fill              63000
Text                     20514
Lines                    174196
Horiz/Vert Lines         7606
Rectangles (outline)     5960
Rectangles (filled)      148724
Circles (filled)         91860
Circles (outline)        75255
Triangles (outline)      55253
Triangles (filled)       90589
Rounded rects (outline)  27304
Rounded rects (filled)   186664

David, thanks again for your support!
 

Go Up