TFT 1.8'' shield with arduino mega

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ammarqs
 
Posts: 12
Joined: Fri Jan 11, 2019 4:56 pm

TFT 1.8'' shield with arduino mega

Post by ammarqs »

Hello,
I am testing the adafruit tft 1.8'' screen with built in sd card reader, joy stick and 3 push buttons.
I was trying to run the sd card part of the shield. The shield works fine with the arduino uno after i set the chip select as 4 on the SD card example for ReadWrite.
Once i plug that same module in the Arduino mega board, with the same program, the sd card stops performing. The initilization fails and when it does initiliaze after resetting multiple times, its puts out garage to the sd card. I tired more than one arduino mega boards and all the same issue.
Any advice?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

Post by adafruit_support_bill »

For use with the Mega, you need to use software SPI. This requires that you specify the MOSI and CLK pins in addition to the CS and RST pins.

See "Option 2" in the comments of the graphicstest example code : https://github.com/adafruit/Adafruit-ST ... cstest.ino

User avatar
ammarqs
 
Posts: 12
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

Post by ammarqs »

Appreciate your reply.
This board supports the seesaw_shiled18_test code. And for the SPI communication, the shield uses the ICSP port and not pin 11 and 13. So this setup should still work with any board, shouldn't it?
Please advice?

User avatar
ammarqs
 
Posts: 12
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

Post by ammarqs »


User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

Post by adafruit_support_bill »

Do you have the ICSP header installed? Please post a photo showing your soldering to the shield.


User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

Post by adafruit_support_bill »

The photo links you posted do not work. It says:
We’re sorry, but your Gmail account is temporarily unavailable.
To post photos to the forum, you can use the "Choose File" and "Add The File" buttons below the edit window.

There is a 1 meg limit. 800x600 is a good size.

User avatar
ammarqs
 
Posts: 12
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

Post by ammarqs »

Sorry about it. Trying again.
Attachments
9518CF3B-C862-4340-8C62-9C8A1851A3C3.jpeg
9518CF3B-C862-4340-8C62-9C8A1851A3C3.jpeg (653.85 KiB) Viewed 345 times
6E612215-ADBE-42BB-8DBD-F3DAC573D009.jpeg
6E612215-ADBE-42BB-8DBD-F3DAC573D009.jpeg (582.01 KiB) Viewed 345 times
1C3FD3A9-A5E6-4488-A111-D2A811F1B0EA.jpeg
1C3FD3A9-A5E6-4488-A111-D2A811F1B0EA.jpeg (786.04 KiB) Viewed 345 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

Post by adafruit_support_bill »

The soldering looks OK. But your first photo shows jumpers. Are you connecting to the Mega via jumpers, or plugging it in via the headers?

User avatar
ammarqs
 
Posts: 12
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

Post by ammarqs »

Those jumpers are for an arducam. I disconnected that but the jumpers were still connected. The the usual SPIs.
The tft shield was connected directly on to the mega.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

Post by adafruit_support_bill »

Strange that it works with the UNO, but not with the Mega. Have you tried running the "cardinfo" example from the SD library?

In line 50, try changing "SPI_HALF_SPEED" to "SPI_QUARTER_SPEED"
if (!card.init(SPI_HALF_SPEED, chipSelect)) {

User avatar
ammarqs
 
Posts: 12
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

Post by ammarqs »

i tried that program and worked alright. I loaded the other program one more time to write data, but same issue all over again. Nothing changed.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

Post by adafruit_support_bill »

Once i plug that same module in the Arduino mega board, with the same program, the sd card stops performing. The initilization fails and when it does initiliaze after resetting multiple times, its puts out garage to the sd card. I tired more than one arduino mega boards and all the same issue.
Please post the code you are using and an example of the garbage being written to the card.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”