Any advice on how to adapt the library for tft screen for MEGA?
Where in the library is the pin outs specified? Will changing them to the pins for MEGA work?
I don't have a shield and I'm directly connecting the screen to the Arduino.
Any advice on how to adapt the library for tft screen for MEGA?
Where in the library is the pin outs specified? Will changing them to the pins for MEGA work?
I don't have a shield and I'm directly connecting the screen to the Arduino.
Please post a link to the actual display that you have bought.
The library is designed for Arduino shields. You just plug the shield into the Arduino header sockets.
LGDP4532 is not enabled by default. Edit MCUFRIEND_kbv.cpp : #define SUPPORT_4532
If you do not have a shield, you just have to provide level-shifting buffers and wire the pins as if was a shield e.g. 3.3V, 5V, GND, A0-A4, D8-D9, D2-D7.
David.
Which pin go to which on the shield?
After doing this will the 4532 be compatible with MEGA?
Thanks
Bare TFT modules are 3.3V (or 2.8V). Your Mega2560 is 5V. You must have level shifters.
Please post a link to the module / board that you have bought. A photo of the pcb is ok.
I have told you the wiring e.g. LCD_CS is A3 via level-shifter. LCD_D1 is D9 via level-shifter. 3.3V is 3.3V.
I can give you step by step instructions when I see a photo of your module/board.
David.
I uploaded a photo before but it seems to have not worked.
What are level shifters?
Images:
https://drive.google.com/drive/folders/1PqOLAAdT-l3_e9GWQ0ghGBlllNggIwzW?usp=sharing
Thank you.
You have a regular shield. You just plug it into your Mega2560.
Install / Upgrade the library via the IDE Library Manager.
Edit MCUFRIEND_kbv.cpp to enable SUPPORT_4532
as in #1
This is nothing more than removing the two forward slash characters //
Everything should work with your LGDP4532.
Note that you always need to make this edit when a new version is installed.
David.
Hello David,
Thank you... it works!!!!
Yi Chen
I am pleased that you have got it working.
Most people have the common controllers like ILI9341, ILI9486, ...
They just install the library via the Library Manager. Plug in the shield. Run the examples.
In your case, LGDP4532 is not common. You had to edit the library file to enable it.
It is difficult for English speakers. More difficult when English is not your first language.
What would improve the instructions?
There is a sketch: "diagnose_TFT_controller.ino"
There are handy tips in extras/mcufriend_how_to.txt
David.