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?
TFT 1.8'' shield with arduino mega
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: TFT 1.8'' shield with arduino mega
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
See "Option 2" in the comments of the graphicstest example code : https://github.com/adafruit/Adafruit-ST ... cstest.ino
- ammarqs
- Posts: 12
- Joined: Fri Jan 11, 2019 4:56 pm
Re: TFT 1.8'' shield with arduino mega
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?
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: 12
- Joined: Fri Jan 11, 2019 4:56 pm
Re: TFT 1.8'' shield with arduino mega
This is the part: https://www.adafruit.com/product/802
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: TFT 1.8'' shield with arduino mega
Do you have the ICSP header installed? Please post a photo showing your soldering to the shield.
- ammarqs
- Posts: 12
- Joined: Fri Jan 11, 2019 4:56 pm
Re: TFT 1.8'' shield with arduino mega
Below are the pictures. Yes i have the header.
https://mail.google.com/mail/u/0?ui=2&i ... &disp=safe
https://mail.google.com/mail/u/0?ui=2&i ... &disp=safe
https://mail.google.com/mail/u/0?ui=2&i ... &disp=safe
https://mail.google.com/mail/u/0?ui=2&i ... &disp=safe
https://mail.google.com/mail/u/0?ui=2&i ... &disp=safe
https://mail.google.com/mail/u/0?ui=2&i ... &disp=safe
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: TFT 1.8'' shield with arduino mega
The photo links you posted do not work. It says:
There is a 1 meg limit. 800x600 is a good size.
To post photos to the forum, you can use the "Choose File" and "Add The File" buttons below the edit window.We’re sorry, but your Gmail account is temporarily unavailable.
There is a 1 meg limit. 800x600 is a good size.
- ammarqs
- Posts: 12
- Joined: Fri Jan 11, 2019 4:56 pm
Re: TFT 1.8'' shield with arduino mega
Sorry about it. Trying again.
- Attachments
-
- 9518CF3B-C862-4340-8C62-9C8A1851A3C3.jpeg (653.85 KiB) Viewed 345 times
-
- 6E612215-ADBE-42BB-8DBD-F3DAC573D009.jpeg (582.01 KiB) Viewed 345 times
-
- 1C3FD3A9-A5E6-4488-A111-D2A811F1B0EA.jpeg (786.04 KiB) Viewed 345 times
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: TFT 1.8'' shield with arduino mega
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?
- ammarqs
- Posts: 12
- Joined: Fri Jan 11, 2019 4:56 pm
Re: TFT 1.8'' shield with arduino mega
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.
The tft shield was connected directly on to the mega.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: TFT 1.8'' shield with arduino mega
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"
In line 50, try changing "SPI_HALF_SPEED" to "SPI_QUARTER_SPEED"
if (!card.init(SPI_HALF_SPEED, chipSelect)) {
- ammarqs
- Posts: 12
- Joined: Fri Jan 11, 2019 4:56 pm
Re: TFT 1.8'' shield with arduino mega
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.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: TFT 1.8'' shield with arduino mega
Please post the code you are using and an example of the garbage being written to the card.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 be positive and constructive with your questions and comments.