Reassign TFT pins for Mega2560 from Mcufriend library

Hi to all. i have seen there are 2 o 3 posts about this topic but i dont find the solution to my problem, so sorry for the new post but the other ones are closed.

basically i want to reassign the pins of a 3.5 tft lcd shield, becouse the shield uses all the PWM pins of my arduino mega.

enabling USE_MEGA_8BIT_PROTOSHIELD i can move digital pins to d22-d29 (i finally figured out how to). i want to move the sd pins too, and if possible some of the analog pins to de d30-d53.

david said that enabling USE_MEGA_8BIT_SHIELD the control lines moved to d38-d41 and d43. which ones are the control lines? which one go in which one?

last but not least, where can i change the pins in the library? i realy dont find where to.

thanks for help

Please post a link to the actual shield that you have bought.

If you want PWM pins, you can use 10-13 for PWM.
This means you can't use the microSD on the shield but you can connect an external microSD to 50-53 which means you can use regular hardware SD.h

You can use USE_MEGA_8BIT_PROTOSHIELD for the data bus but continue to use A0-A4 for the control signals. (which means that the Touch will still work)

USE_MEGA_8BIT_PROTOSHIELD with microSD to 50-53 will give you good performance.
Uno Shields are intended for Uno. They "work" on a Mega2560 but are very SLOW.

David.

i acquired this one

the real problem with the shields is that all uses the same pins :frowning:

and i dont understand if the pins with no label on the back of the shield are "useless" or not. becouse 2 pins go into d0-d1 for tx and rx, but are no labeled on shield side. same for the last 2 pins that goes on GND ad AREF on digital side of mega. in the photo of amazon you can clearly see all the labels and all the missing labels near the pins

i want to use wires becouse the shield and the arduino mega wouldnt be so close togheter, but with some space between. then i can rewire all the shield if is possible

any hint?

The un-labelled pins are not connected. e.g. 0, 1, AREF, A5.
The SD pins e.g. SD_SS, SD_DI, SD_DO, SD_SCK are connected to the microSD receptacle. But if there is no microSD inserted, they are effectively "n.c."

You can access Analog A6-A15 when the shield is plugged in.
Likewise Digital 14-21, GND, 5V. Just use some angle header strip.

Seriously. God invented Shields. They make everything work reliably.

If you want to use trailing wires for the display it is up to you.

I strongly advise you to plug the Shield in properly. Snip off the SD_xxx pins if you want to put angle header strip into those Arduino PWM sockets.

Personally, I made custom wiring with a Protoshield. All custom routes are soldered. So I can plug a TFT shield into the Protoshield "adapter" and operate as a USE_MEGA_8BIT_PROTOSHIELD "special".

David.

thanks for the response