0

Using 1.44" TFT and Data Logger Shield together
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Using 1.44" TFT and Data Logger Shield together

by larrytichauer on Wed Aug 28, 2019 3:31 pm

I have an Arduino MEGA 2650 that works fine with the 1.44" TFT library as well as with the SD card Data Logger shield. I would like to use both items with the same MEGA 2650 simultaneously. However, the callout for CLK is Digital 53 and MOSI is Digital 51 for the 1.44" TFT display while SD logger is different. On the Rev B Shield Pinouts the callout is for SCK appears to go to SCL and I am not sure, according to the documentation on page 23 of 67 of the Data logger shield tutorial, where MISO and MOSI connect to on the MEGA 2650.

I am aware that different chip select pins must be used for each peripheral but am not aware if two separate serial busses can peacefully coexist on the same processor simultaneously. I want to understand how to properly interface with both peripherals before venturing further.

larrytichauer
 
Posts: 3
Joined: Wed Aug 28, 2019 2:53 pm

Re: Using 1.44" TFT and Data Logger Shield together

by dastels on Thu Sep 05, 2019 10:39 am

The idea behind SPI is that you have common clock, mosi, and miso lines for multiple peripherals, and each has a separate CS line. So (without actually trying it) I think you could have both connected if you can give each one its own CS pin and have the code reflect that.

Dave

dastels
 
Posts: 230
Joined: Tue Oct 20, 2015 3:22 pm

Re: Using 1.44" TFT and Data Logger Shield together

by larrytichauer on Thu Sep 05, 2019 7:26 pm

Dave:

Thanks for the reply. I agree with you in theory. In this case I want to utilize the adafruit libraries without modifying the libraries.

I too would prefer not to have to breadboard this if it won't work. I can imagine that I am not the first user to desire using two Adafruit products with conflicting library parameters.

larrytichauer
 
Posts: 3
Joined: Wed Aug 28, 2019 2:53 pm

Re: Using 1.44" TFT and Data Logger Shield together

by adafruit_support_bill on Thu Sep 05, 2019 7:45 pm

If you have a fairly recent version of the data logger shield, it should have a 2x3 pin ICSP header. On R3 and later Arduinos, the SPI bus pins are also available via the ICSP header, and the logger can share the hardware SPI bus with the display.

If you have an older shield or an older Mega, you can still use the logger shield via software SPI on pins 11-13. The SD library supports this mode of operation.

Also with R3 and later Arduinos and with the current version of the shield, the i2c bus pins are replicated next to the AREF pin. So you can just stack them to have i2c connectivity as well.

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

Re: Using 1.44" TFT and Data Logger Shield together

by larrytichauer on Fri Sep 06, 2019 12:49 am

Thank you! I am assuming the existing libraries will play nice together as well. Time to experiment.

larrytichauer
 
Posts: 3
Joined: Wed Aug 28, 2019 2:53 pm

Please be positive and constructive with your questions and comments.