I came across this screen by a rather roundabout route
It has an RM68140 controller instead of the advertised ILI9486, HX8357C, HX8357D , or r61581
I am currently using
#include <MCUFRIEND_kbv.h>
#include <Adafruit_GFX.h>
The colours are correct and graphics work, but rotation only moves +/- 90 degrees, and alternately gives mirrored text. So far I haven't got any results from the touch screen.
I wondered if anyone has got this screen working fully, and which libraries they are using (and can even share the code)?
Thanks in anticipation
You can open as many threads as you want.
You will only get an answer if you reveal the library version.
The Library Manager will tell you.
Any verbose build will tell you.
The graphictest_kbv Adafruit_Tests Report page will tell you.
It would be more interesting to hear where you got the library from.
TFT panels vary. Even if you have a Red Mcufriend shield with the same controller, the panel may have different characteristics.
If you provide the information e.g. Blue penguin has horizontal mirror. Green (Landscape) penguin is ok.
I can show you how to change ONE line of code.
It takes 10 minutes of your life.
And 1 minute of my life.
When there are protracted threads, it takes time to answer them. (and it costs you a lot more than 10 minutes)
David.
Thank you David.
I started this separate thread as I came in to the previous thread two years after it last had a post, and as you were the only person who responded I hoped a more targetted subject might attract more people.
Sadly it seems that we are all guinea pigs, receiving a very mixed bag of kit from eBay sellers who supply no supporting s/w and so we rely on the goodwill of people like you to kindly help us out! No one would ever buy a TV or a car without knowing what was inside, so why do we - even when the sellers say
- 'This kit requires certain professional knowledge and ability, make sure you know how to use it, please. We cannot provide any technical assistance.'
I am running cheap Chinese clone UNOs which have worked fine for around 3 years, and Arduino IDE 1.8.5
The libraries I am using are
- your MCUFRIEND_kbv version 2.9.1-beta TFT Library for 2.4, 2.8, 3.5, 3.6, 3.96 inch mcufriend UNO shields, and my RD pin is accessible.
- Adafruit_GFX.h by Adafruit Version 1.2.7
I can see that there are later versions of both of these, but I do not know why the Library Manager has not updated them.
My test program ran fine with these libraries on my earlier mcufriend with controller chip HX8357D. Alphas, graphics and rotation worked fine, but the colours were inverted.
Are you suggesting that later versions will have code to cope with the RM68140 controller? If so, why doesn't Library Manager update them?
I answered my own question by updating both libraries and the rotation and mirror text remain the same.
But I then commented out the instruction identifier = 0x9486; and rotation works with no mirroring. Going back to the old libraries returns me to the rotation and mirroring.
Now to track down code for touchscreen and Etchasketch!
The Library Manager handles official Releases very well.
e.g. you had v2.9.5 Release it would have updated you to v2.9.8 Release
I don't know where or how you obtained v2.9.1-Beta.
But it certainly did not know how to control a RM68140 properly until v2.9.3.
What does a verbose build say? Please paste just the "used library" lines.
Leave the IDE. Delete your "old" MCUFRIEND_kbv directory.
Restart the IDE. Run the Library Manager. Install properly. Update Adafruit_GFX at the same time.
Anything installed by the Manager should update / downgrade happily.
A library manually installed from ZIP does not always comply with the "official library" rules.
Now run my examples. It is quite possible that you have an "unusual" panel.
I can only rely on owner's feedback.
David.
David
I have run a number of your mcufriend examples and they all come out well - especially the bmp ones, although they show how slow a UNO is - presumably they would be much faster on an ESP32.
I had no idea you had done so much work on the mcufriend libraries in addition to all the other work you do to help us hobbyists out. Thank you so much!
I hit some problems with Touch_shield_new, in that the colour stayed red and did not really follow my finger, BUT, having studied the verbose outputs I now realise that, having loaded libraries from zips, some are in my local instead of the system folder and so not being updated. Mega revamp needed so I will leave you in peace while I sort it all out.
Thanks again. You have opened my eyes to many things, but most importantly shown me that my TFT LCD is fun and not a dud!