Hi,
I try to use the TFT display and the SD card at the same time that are presnt on the Seeeds Studio “Round Display”.
So far, I managed to:
use the TFT with SPI bus initialized using MOSI and SCK pins.
use the SD card(*) with with SPI bus initialized using MISO, MOSI and SCK pins.
But I cannot use both at the same time.
Shall I try to multiplex their usage, I mean to spi.deinit() each time I need to use the SPI with a different set of pins or do something else?
–
(*I can detect the card, create a vfs object, format the card, but not mount it yet. As I have the same issue on my Laptop with the SD card I assume I will fix this just changing the card: it times out at some init stage.)
Other infos:
I use a XIAO ESP32C3 with Circuit Python 9.0.5 (and occcasionally an ESP32C6 with recent CircuitPython nightly builds from S3)
Even if not plugs are present for this on the Round Display, I use other I2C sensors plugged “my way” on the I2C pins of my boards. This works well.
Hi there,
So what pins do you use for the CS ?
Just deassert it and you should be able to use both?
Post up the code and all tha smart folks here will comment and help.
HTH
GL PJ
I mean, I don’t know if the pins can be shared or are of excluive usage regarding the spi bus. I don’t know yet how to use CS, but this sounds what I need maybe.
Hi there,
Yes that is correct and SPI is a shared bus you can if you , use some pin control to differentiate between the two SPI devices. SD card is D2 and Display would be D1, also the begin() can be used to include the CS for whichever device your talking to.
Take a look at the "gif player/viewer code for the Xiao Round display example. That may clear up how it’s done.
The TFT_eSPI lib handles the display , you only need the SD part to look at.
GL PJ