0

TFT w Joystick and SD v2 - Confusion!
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

TFT w Joystick and SD v2 - Confusion!

by sgparry on Sun Jan 20, 2019 5:06 pm

I am looking at the new v2 802 shield for my Arduino Mega robot, and it looks like a very nice upgrade from the v1. However, I am trying to work out from the schematic and the product description what is going on with the pins so I can avoid a pin clash with my other shields but one thing is throwing me.
The product description says:
If you just want to display text, shapes, lines, pixels, etc the shield uses the SPI pins (SCK/MOSI/MISO), I2C pins (SDA & SCL) and digital #8. For the microSD card, you'll also give up Digital #4.

At worst, that suggests the shield uses the SPI pins on the central connnector, the I2C pins, D4 (for SD CS) and D8 (for TFT DC). The schematic shows one more however. There is a connection to D10 for TFT CS. If I understand the pin names correctly, TFT CS is the pin that the host Arduino uses when communicating via SPI to select the TFT, rather than any other SPI device (e.g. the SD card). Which is correct please? D10 is already in use on my project so this is a key question.
Also, what top I2c speed will the seesaw accept please?

sgparry
 
Posts: 8
Joined: Mon Jan 09, 2017 10:15 am

Re: TFT w Joystick and SD v2 - Confusion!

by adafruit_support_carter on Tue Jan 22, 2019 3:37 pm

I think you are correct. D10 is the TFT chip select, which is needed as part of the SPI communications. Are you having any issues with the display since it sounds like you are also using D10 for something else?

adafruit_support_carter
 
Posts: 9703
Joined: Tue Nov 29, 2016 2:45 pm

Re: TFT w Joystick and SD v2 - Confusion!

by sgparry on Tue Jan 22, 2019 4:47 pm

It's kind of a pre-sales query - I currently have a v1 tft shield as part of my prototype Arduino mega based classroom robot. The TFT shield SPI pins are 'hotwired' to the Mega SPI pins via a right-angle header on the shield and a connector on my main board. It's a bit of a hack but it works well. I am intending to create a new main board for the next iteration of the prototype which will be a total of three robots. I am looking at perhaps upgrading to the v2 TFT as part of the redesign. On the whole it looks like a good idea - firstly because using the standard shield pins will save on some board space and soldering but mainly because we have to, the v1 is no longer available. D10 however is in use on one of the other shields (a Dagu ComMotion). Fortunately, it is only used during programming of the ComMotion, but I'd rather not have to lever off the display shield every time I need D10 for that. If the SPI is inactive at the time (no SPI Clock activity) when the ComMotion is communicating on D10, presumably the TFT is going to just sit quietly and at worst wait for SPI data that never arrives?

sgparry
 
Posts: 8
Joined: Mon Jan 09, 2017 10:15 am

Re: TFT w Joystick and SD v2 - Confusion!

by adafruit_support_carter on Tue Jan 22, 2019 5:04 pm

Just to add more evidence, can even see D10 being used here:
https://github.com/adafruit/Adafruit-ST ... st.ino#L34

That same pin was used for TFT_CS in the v1 shield also. How did you deal with the pin conflict there?

adafruit_support_carter
 
Posts: 9703
Joined: Tue Nov 29, 2016 2:45 pm

Re: TFT w Joystick and SD v2 - Confusion!

by sgparry on Tue Jan 22, 2019 8:34 pm

I left off that whole header (D8 - D13) and instead soldered a right angled header to the corresponding breakout holes on the top of the shield. This I then cabled that to a connector on my board. The pins on that connector are routed to the Digital pins 49 - 53 on the Arduino Mega 2560, allowing me to use hardware SPI. IIRC I use 49 for DC and 53 for TFT_CS. I am trying to avoid all that with the new design.

sgparry
 
Posts: 8
Joined: Mon Jan 09, 2017 10:15 am

Re: TFT w Joystick and SD v2 - Confusion!

by adafruit_support_carter on Tue Jan 22, 2019 9:19 pm

Maybe they will work together? You can reference the schematic for the display and see everything that's connected to D10. And then use that along with whatever you have info wise for the other shield.

Another option - re-route the TFT_CS to another pin. The display has two headers rows that are connected directly across. The ones that are used on the board are then routed as needed. You could cut the trace for D10 between the two rows and then solder in a new jumper to a different digital pin. And change the pin in software to match. For example, to move it to D11:
jumper.jpg
jumper.jpg (212.51 KiB) Viewed 48 times

adafruit_support_carter
 
Posts: 9703
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.