Have been dealing with this for quite some time now but only granted with a white screen so I must do something wrong or the display is simple broken. Haven't dealt with TFT screens before but they seemed to be easier to control then I though, if I can get one to work that is. Have gone through similar topic suggestions here but no one have used the same screen so no help there.
Have defined the pins for a the Mega but examples I have tried so are some names not existing on the TFT or vice-versa or can't find where to put them even if i normally find the places in some .h file.
Have tested fex some examples in mcufriedn_kbv (yea I know its for UNO but hey worth a try), some UTFT and what not but the TFT I have don't have the same pin names that many libs and examples needs so of course nothing works I guess. And the tft doesnt have "read" pin so It can't be identified either.
Anyone have a lib or just some extremely simple example that accepts the pins the screen have and that would guaranteed work with this TFT, just so I know that it work or just anything?
Unfortunately neither library is available from the IDE Library Manager. You have to install them manually.
I suggest that you start with UTFT examples e.g.
C:\Users\ ...\Documents\Arduino\libraries\UTFT\examples\Arduino (AVR)\UTFT_Demo_480x320\UTFT_Demo_480x320.ino
Edit the constructor statement from:
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(CTE32HR,38,39,40,41);
to
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(ILI9486,38,39,40,41);
plug the shield into your Mega2560
build and upload the sketch.
Now try all the other UTFT examples. Remember to edit the constructor statement in each sketch.
When you have UTFT working 100% you can try TFT_HX8357
Edit User_Setup.h to define ILI9486
Build and Run all of the TFT_HX8357 examples. You don't need to edit the sketches.
At each step, take notes with pencil and paper.
If you have a problem you can type from your notes.
David.
p.s. yes, MCUFRIEND_kbv is a lot more complicated to configure.
Will try the things you mention and the model parameter would be very good to change yes. But the numbers, I must know what goes to the RST, WR, CS, RS. I guess there is an order but I don't know what that would be and can't find any info in the lib either.
Hmm, might miss something here but I was not aware that I need to build it, kinda thought just change, save the file, probably restart IDE and the IDE would afterwards handle the newly changed files normally? How is that rebuild otherwise done?
Absolutely a photo because without it its just a guessing game that waste time for ppl that want to help.
Have not been on the forum for over a year but I wonder what the heck had happened, totally agree.
That is why God invented Shields. You don't alter the RST, WR, CS, RS arguments.
You plug the Shield into the Mega2560 header sockets as Nature intended. Each male pin finds a female socket.
With any sketch you have to Compile and Upload it. "Build" is just another name for Compile. And since a compiled sketch runs as soon as it has been Uploaded, "Build and Run" is just another name for the right-arrow icon.
I know that predefined known shield have known pin assignment and thus can easily be preprogrammed into a sketch, for example those made for the UNO, but what say that the RST, WR, CS, RS (and I guess the data pins as well) on a unknown TFT are at the exactly right pins as the sketch want it to be? Or is some kind of TFT standard or something? I'm not arguing with you I'm just curious.
Totally forgot that it of course was specifically made for the Mega2560, was so concentrated to make it work, and thus everything is designated right in the sketch, sorry.
And everything works! The ILI9684 re-designation was that made it all, I had another UTFT before but it didn't have that part. Now its just to get this to work in and with other sketches as well but this was a very good bit on the way to do that since I now know the basic how to get this to work. Thanks a bunch!
Gees, that graphic test was like night and day and quite cool as well, learned more things there and there was a lot of other good examples as well, really good!
I have looked at the ESP32 as well and they are cool with the 2 cpus but they normally, as far as I have seen, don't have as many pins and I want at least as many pins as the Mega2560 has to be sure to have to anything you throw at it.
But I have reconsidered a little, it seem the F/H7 and 144 pins are little over the top and I don't really need that much power for now either. And also when you say it won't be much faster with a H7 and its clock I might go with the F4 instead and they can go up to over 80MHz anyway and are in the same range as the Mega2560 what goes for pins but much faster so perhaps they can take even a 800x600 screen Idk but I already ordered a Nucleo L476RG.