Go Down

Topic: www.mcufriend.com working in arduino uno and arduino mega (Read 92046 times) previous topic - next topic

david_prentice

It should have reported an ID = 0x4747 (not 0x4343)

You have a Himax HX8347-D controller.   
Edit MCUFRIEND_kbv.cpp:  #define SUPPORT_8347D

I am sorry that you have to do all these extra defines.    These are not very common controllers.
If Open-Smart were to ask me,  we could make their customers' lives easier!

If it still reports ID=0x4343,  you will have to force tft.begin(0x4747);

David.

sebweb

good afternoon David,
i think i am not a great program maker because my lcd screen is always white.
i have test this code, can you read this and corrected please ? or give me a simple code for change color of screen whithe a good write for my lcd screen ?

thank you in advence.

david_prentice

You have put your #defines in the wrong place.
You have to edit the files in the library directory i.e.
steps (2), (3) in message #326.
and edit MCUFRIEND_kbv.cpp as in #330

Yes,  I know that the "aspect" example is nice and short.
When you get things working,  you should run graphictest_kbv.ino

David.

sebweb

thank you very much David, my LCD screen is a life.
i have anderstend what did you say for step 2 and 3
i can use program "graphictest_kbv" succeful.

so in step 2 the program " Touchscreen_Calibr_kbv"
i have one error :
TouchScreen_Calibr_kbv:36: error: 'TSPoint' does not name a type
 TSPoint tp;                      //Touchscreen_due branch uses Point

Can you help me one more time please ?

who_took_my_nick

#334
Aug 16, 2017, 12:02 am Last Edit: Aug 16, 2017, 12:18 am by who_took_my_nick
I bought 2,8" shield from aliexpresss and while seller said it is ILI9325 i found out that it just won't work with basic Adafruit libraries. I started to force it with different drivers and finally found out that it is HX8347G because it start working with tft.begin(0x7575). It was all messed up with bunch of junk pixels, when i finally used Buhosoft library from here:
http://forum.arduino.cc/index.php?topic=292777.0
It all worked from the start. All examples. Display, colors, touch, sd... except it was all mirrored. I tried few things but no luck. Function tft.setRotation works, but it rotate image (or text, whatever), but i need it to fix that mirror bug. Problem is the same with UNO and MEGA.

Alixpress page:
https://www.aliexpress.com/item/EYEWINK-LCD-Display-Module-TFT-2-8-inch-TFT-LCD-screen-for-Arduino-UNO-R3-Board/32810579208.html

who_took_my_nick

I used LCD_ID_readreg and get:

---------
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) 47 47 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00 Manufacturer ID
reg(0x0009) 3F 3F 3F 3F 3F Status Register
reg(0x000A) 00 00 Get Power Mode
reg(0x000C) 01 01 Get Pixel Format
reg(0x0061) 00 00 RDID1 HX8347-G
reg(0x0062) 80 80 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) 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 GAMMA-P
reg(0x00E1) 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 GAMMA-N
reg(0x00EF) 49 49 49 49 49 49 ILI9327
reg(0x00F2) 10 10 10 10 10 10 10 10 10 10 10 10 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control

-------------

david_prentice

You have a regular Blue 2.8" Shield.

It contains an HX8347-D controller with ID = 0x4747
The HX8347-G has an ID = 0x7575

Follow the instructions in #300 or #302

Please let me know how you get on.

David.

who_took_my_nick

That's what LCD_ID_readreg said.
I tried your library, and examples from it. Graphic tests won't show anything, both UNO and MEGA. In serial monitor it says id=0x4747.

It's funny that with library BUHOSOFT provide here my display works, but as 0x7575. Beside that mirror bug.

Any help would be appreciated.

who_took_my_nick

I made a HUGE mistake not reading previous posts good enough. I will punish myself with a coffee with sugar, and sugar in coffee i hate the most.

For other guys, trust David's code. In my case i missed to remove comments from #define SUPPORT_8347D. When i did it, display worked just fine. No mirrors, no nothing. Haven't go through all of examples. Got to go to work, and i will continue this evening. I will inform you how it works.

sebweb

Hello David can you reply to my post post above # 333

david_prentice

#340
Aug 16, 2017, 04:48 pm Last Edit: Aug 16, 2017, 04:50 pm by david_prentice
Where did you get the TouchScreen.h library from ?
What does the Library Manager say?  e.g. version

What Arduino are you using?

Most TouchScreen libraries are pretty flaky.
And most do not work with a Due.

If and when I ever get any response from SPFD5408 owners,  I will publish a new Release of my MCUFRIEND_kbv library.    I will include a TouchScreen_kbv library that works reliably on Uno, Mega, Due, Zero, STM32, Teensy, ...
I will also publish a Calibration sketch that diagnoses the Touch pins as well as reporting the results to Serial and TFT.

David.


who_took_my_nick

Have gone through all examples and everything works just fine. Few changes have to be made in my case (orientation for touchscreen, etc) but nothing more.

Thank you David.

sebweb

Hi david,i have a good news, my touch screen runing.
For anser your questions :

My TouchScreen library is:
// Touch screen library with X Y and Z (pressure) readings as well
// as oversampling to avoid 'bouncing'
// (c) ladyada / adafruit
// Code under MIT License

I use one arduino uno R3.

when i try use the "UTouchScreen_Calibr_kbv" example in "MCUFRIEND_kbv" library

i have this error :
Arduino : 1.8.3 (Windows 7), Carte : "Arduino/Genuino Uno"

UTouch_Calibr_kbv:38: error:
'TSPoint' does not name a type

TSPoint tp;                      //Touchscreen_due branch uses Point

exit status 1
'TSPoint' does not name a type


I have juste Change "TSPoint tp"   by "Point tp" and my toutch screen worked

i post the pragrame "UTouch_Calibr_kbv_HX8347D_ok_seb" and "tftpaint_HX8347-D_ok_seb" there programs working for my LCD touch screen HX8347D whith ID 0x4747


so i have a last question for you David,
what is code to use the five botons which repesente (home ,letters,book,phone and music note.

leekjie123

#343
Aug 18, 2017, 10:10 am Last Edit: Aug 18, 2017, 10:18 am by leekjie123
hey guys im using a mcufriend 0x4532 display and i just cant seem to calibrate it nor using any graphic test i found on the internet,all of those just led to white screen as result.== are there any working libraries that i can use?

david_prentice

You must edit MCUFRIEND_kbv.cpp:

Code: [Select]

#define SUPPORT_4532              //LGDP4532 +120 bytes.  thanks Leodino


David.

Go Up