Go Down

Topic: 2 and more duplicated screen on 2.4 LCD TFT Arduino Uno Shield (Read 1 time) previous topic - next topic

david_prentice

#45
Nov 28, 2017, 04:49 pm Last Edit: Nov 28, 2017, 04:50 pm by david_prentice
Compare your item to the message #2.

If you have exactly the same device,   I can't help remotely.
If you are in Europe,   you could PM me and mail me an example screen.
If I can get it working,  I can mail it back to you.

If it is not exactly the same as #2,  please copy-paste your results from diagnose_TFT, LCD_ID_readreg.
It is quite possible that I already support it.

David.

PrinceCharles23

#46
Nov 28, 2017, 10:39 pm Last Edit: Nov 28, 2017, 11:15 pm by PrinceCharles23
i went through all the steps you two played back and forth.
same results as stated in #3, #8, #10, #23, #27, #32, #34, #39

i ordered two pieces here:
http://www.dx.com/p/diy-2-4-tft-lcd-touch-screen-shield-expansion-board-for-arduino-uno-350121#.Wh3VzFXiZQI

just for kicks i plugged in the second one, fixed the id to 0x1520 and it works!

not sure what to make of it. i filed a ticket request on the seller page and want to wait how that plays out. should i not need to return the "broken" one i can send it to you for further testing. shipping fees should be moderately enough from austria, eh?

david_prentice

The DX.com description does not mention the controller model.
And it is UNTRUTHFUL about the pins used.

Does your shield have a paper label or rubber stamp with a number printed on it?
Compare pcb with the photos on the website.

Please copy-paste the LCD_ID_readreg and diagnose_TFT output.

I presume you meant to type "Austria".   Mail to the UK is pretty quick and inexpensive.
Obviously UK to UK is fast and cheap.

I can probably get you going without mailing anything.   
I would like to identify properly.   I don't like the thought of guessing 0x1520.   

David.

PrinceCharles23

The DX.com description does not mention the controller model.
And it is UNTRUTHFUL about the pins used.
yeah, no shit!?! i guess that's not the only thing they are untruthful/incomplete about :-(

Does your shield have a paper label or rubber stamp with a number printed on it?
Compare pcb with the photos on the website.
see pictures below. no real stamp or anything useful. at least not to me. i googled EVERY SINGLE number i could find. the only one helpful lead me to this thread here ;-)

Please copy-paste the LCD_ID_readreg and diagnose_TFT output.
LCD_ID_readreg:
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 71 00 00 Status Register
reg(0x000A) 00 08 Get Power Mode
reg(0x000C) 00 77 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(0x00D4) 00 00 00 00 Novatek ID
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) 00 16 16 03 08 08 08 08 10 00 16 16 Adjust Control 2
reg(0x00F6) 00 00 80 10 Interface Control

diagnose_TFT_support:
Code: [Select]
Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x0


This ID is not supported
look up ID in extras/mcufriend_how_to.txt
you may need to edit MCUFRIEND_kbv.cpp
to enable support for this ID
e.g. #define SUPPORT_8347D

New controllers appear on Ebay often
If your ID is not supported
run LCD_ID_readreg.ino from examples/
Copy-Paste the output from the Serial Terminal
to a message in Displays topic on Arduino Forum
or to Issues on GitHub

I presume you meant to type "Austria".   Mail to the UK is pretty quick and inexpensive.
Obviously UK to UK is fast and cheap.
[/code]
typo corrected! well, i would not know about uk-uk but i guess austria-uk will be about the same as the actual price of the tft...

I can probably get you going without mailing anything.   
I would like to identify properly.   I don't like the thought of guessing 0x1520.   
[/code]
i have no use for the first tft (the one that does not work) - obviously
so i can send it to you if you really want to take the challenge!

it was late yesterday so i somehow screwed up when testing the second tft (the working one). when doing the diagnostics today everything works fine without hardcoding:
this is from diagnose_TFT_support
Code: [Select]
Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x9341


PORTRAIT is 240 x 320

Run the examples/graphictest_kbv sketch
All colours, text, directions, rotations, scrolls
should work.  If there is a problem,  make notes on paper
Post accurate description of problem to Forum
Or post a link to a video (or photos)

I rely on good information from remote users

aaaaan LCD_ID_readreg:
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) 00 08 Get Power Mode
reg(0x000C) 00 06 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 02 Inversion Control
reg(0x00B6) 00 0A 82 27 04 Display Control
reg(0x00B7) 00 06 Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B
reg(0x00C0) 00 21 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 73 Panel Control
reg(0x00D0) 00 00 00 Power Control
reg(0x00D2) 00 00 00 03 03 NVM Read
reg(0x00D3) 00 00 93 41 ILI9341, ILI9488
reg(0x00D4) 00 00 00 00 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 00 00 RDID2
reg(0x00DC) 00 00 RDID3
reg(0x00E0) 00 0F 16 14 0A 0D 06 43 75 33 06 0E 00 0C 09 08 GAMMA-P
reg(0x00E1) 00 08 2B 2D 04 10 04 3E 24 4E 04 0F 0E 35 38 0F GAMMA-N
reg(0x00EF) 00 03 80 02 02 02 ILI9327
reg(0x00F2) 00 02 02 02 02 02 02 02 02 02 02 02 Adjust Control 2
reg(0x00F6) 00 01 00 00 Interface Control


big thanks for the support so far! - my suspicion is that the "unsupported" tft is actually broken somehow.

david_prentice

Thanks for the feedback.

Ok,  so your ID=0x0000 display seems to have the same registers as desironnA's one in #2.
The pcb says 2.4" so I would expect it to be 240x320.

Your ID=0x9341 display should work normally.   With my library and many other libraries.

I will send you a PM.

David.

PrinceCharles23

another thing i just realized by playing around with the working display is that i do not have many pins left to use on my nano:
  • D0/D1 is used for serial - i do not want to develop in the dark, even with the display connected
  • D10-D13 if i do not use the SD card - but i intend to do that
  • A4 if i connect LCD_RESET to Arduino's reset pin
  • A5-A7 seem to be available

and that's about it. am i correct?
i read up on multiplexers and shifting registers. do you think driving the display via one of these would work? is it even possible without rewriting the whole library?

david_prentice

God invented Arduinos with female header sockets and Shields with male pins.
You just mate the two items together.

Yes,  there are not many spare pins on an TQFP-32 Uno.   Even less on a regular DIP-28 Uno.

Choose carefully.   Many projects can be done with Unos.
I see little point in using a Nano since it has no female header sockets.

I would never mess around with port expanders, multiplexers, shift registers, ...
If you need more pins,  buy a MEGA2560 or DUE.

As a general rule,  choose a family member with enough pins and memory as the first step in the design of a project.    e.g. ATmega164, ATmega324, ATmega644, ATmega1284.

The same applies to XMega and STM32 parts.   They come with different numbers of legs and memories.

David.

PrinceCharles23

i see no reason why i would not use some wires to pair a nano with some shields/devices. but i see your point. when creating many projects price becomes an issue since a (chinese knock-off) nano is much cheaper than a due. but i finally got my due board. so now i can decide whether to use the due or the nano with a shield adapter board (pin compatible to a due but less pins)

there are news on the display thingy too:
my supplier seems to admit that the display is broken and is willing to send replacement. i guess that explains the whole thing...

Go Up