SPI and I2C Together Trinket M0

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jefry876
 
Posts: 3
Joined: Tue Oct 11, 2022 5:25 am

SPI and I2C Together Trinket M0

Post by jefry876 »

Hi, I need to use a sensor that operates in I2C and have an SD Card the operates in SPI store the data from the sensor. I noticed that Pin 2 on the Trinket M0 has a dual function as SCL for I2C and MISO for SPI. Is there a way to have a component operate in SPI while using I2C with this board?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: SPI and I2C Together Trinket M0

Post by dastels »

No. The Trinket has 5 I/O pins. I2C uses 2, and SPI for an SD card (read/write) needs 4. You can switch to a QtPy M0 which supports both I2C and SPI simultaneously (and serial with 4 pins left over). https://www.adafruit.com/product/4600

Dave

User avatar
jefry876
 
Posts: 3
Joined: Tue Oct 11, 2022 5:25 am

Re: SPI and I2C Together Trinket M0

Post by jefry876 »

jefry876 wrote: Tue Oct 11, 2022 5:34 am Hi, I need to use a sensor that operates in I2C and have an SD Card the operates in SPI store the data from the sensor. I noticed that Pin 2 on the https://BANNED/ Trinket M0 has a dual function as SCL for I2C and MISO for SPI. Is there a way to have a component operate in SPI while using I2C with this board?
I got this,....

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”