0

TFT 1.8'' shield with arduino mega
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

TFT 1.8'' shield with arduino mega

by ammarqs on Fri Jan 11, 2019 4:59 pm

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?

ammarqs
 
Posts: 10
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

by adafruit_support_bill on Fri Jan 11, 2019 5:11 pm

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

adafruit_support_bill
 
Posts: 71756
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

by ammarqs on Fri Jan 11, 2019 5:16 pm

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?

ammarqs
 
Posts: 10
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

by ammarqs on Fri Jan 11, 2019 5:16 pm


ammarqs
 
Posts: 10
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

by adafruit_support_bill on Fri Jan 11, 2019 5:24 pm

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

adafruit_support_bill
 
Posts: 71756
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

by ammarqs on Fri Jan 11, 2019 5:28 pm


ammarqs
 
Posts: 10
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

by adafruit_support_bill on Fri Jan 11, 2019 7:03 pm

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.

adafruit_support_bill
 
Posts: 71756
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

by ammarqs on Sun Jan 13, 2019 1:24 am

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

ammarqs
 
Posts: 10
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

by adafruit_support_bill on Sun Jan 13, 2019 9:09 am

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?

adafruit_support_bill
 
Posts: 71756
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

by ammarqs on Sun Jan 13, 2019 12:29 pm

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.

ammarqs
 
Posts: 10
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

by adafruit_support_bill on Sun Jan 13, 2019 12:54 pm

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)) {

adafruit_support_bill
 
Posts: 71756
Joined: Sat Feb 07, 2009 10:11 am

Re: TFT 1.8'' shield with arduino mega

by ammarqs on Mon Jan 14, 2019 9:11 am

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.

ammarqs
 
Posts: 10
Joined: Fri Jan 11, 2019 4:56 pm

Re: TFT 1.8'' shield with arduino mega

by adafruit_support_bill on Mon Jan 14, 2019 9:17 am

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.

adafruit_support_bill
 
Posts: 71756
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.