Adafruit is open and shipping! Let's build back better, together!
0

PiTFT + Additional SPI device?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PiTFT + Additional SPI device?

by maximinimal on Mon Dec 07, 2020 1:10 pm

Hi all!

I'm trying to connect a MAX98357-based audio DAC to an RPi 0 W connected to a PiTFT. However, these devices both rely on SPI, with the MAX98357 using I2S.

I see here (https://pinout.xyz/pinout/spi) that there are two SPI busses, but the PiTFT uses one of the pins from the second SPI bus as a GPIO!

Any ideas on how I might be able to proceed?

Thanks! :]

maximinimal
 
Posts: 7
Joined: Fri Jun 05, 2020 6:24 pm

Re: PiTFT + Additional SPI device?

by mikeysklar on Tue Dec 08, 2020 6:46 pm

@maximinimal,

So the MAX98357 is a I2S device using these pins:

Code: Select all | TOGGLE FULL SIZE
Amp Vin to Raspbery Pi 5V
Amp GND to Raspbery Pi GND
Amp DIN to Raspbery Pi #21
Amp BCLK to Raspbery Pi #18
Amp LRCLK to Raspbery Pi #19


The PiTFT (3.5") is also trying to use BCLK on the Pi #18. This is a significant conflict. I don't know of any way to remap BCLK to another Pi pin. Your best bet will be to switch to another display that does not have a pin conflict if you want to use I2S.

mikeysklar
 
Posts: 2795
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT + Additional SPI device?

by maximinimal on Fri Dec 11, 2020 11:59 am

Hi, thanks for your help!

I do indeed see that, though I was under the impression that the RPi 0 offers two SPI busses. Is this not correct?

Thanks again!

maximinimal
 
Posts: 7
Joined: Fri Jun 05, 2020 6:24 pm

Re: PiTFT + Additional SPI device?

by mikeysklar on Fri Dec 11, 2020 3:15 pm

You are correct that the Pi Zero (and all Pi's with 2x20 connector) currently have two SPI buses. However, the 3.5" PiTFT is designed to press connect to the SPI0 bus. It should be possible to physically wire your own connections to the SP1 bus and configure the display to use SP1 in /boot/config.txt. This would not allow you to stack the TFT on your Pi as a hat.

Take a look at this discussion:

https://raspberrypi.stackexchange.com/q ... -same-time

mikeysklar
 
Posts: 2795
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT + Additional SPI device?

by maximinimal on Thu Jan 07, 2021 6:06 pm

Thanks so much for sharing (and sorry for the delayed response).


I'll explore that link and try this out.


Thanks again, and happy 2021!

maximinimal
 
Posts: 7
Joined: Fri Jun 05, 2020 6:24 pm

Please be positive and constructive with your questions and comments.