SPI and I2C Together Trinket M0
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jefry876
- Posts: 3
- Joined: Tue Oct 11, 2022 5:25 am
SPI and I2C Together Trinket M0
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?
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: SPI and I2C Together Trinket M0
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
Dave
- jefry876
- Posts: 3
- Joined: Tue Oct 11, 2022 5:25 am
Re: SPI and I2C Together Trinket M0
I got this,....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?
Please be positive and constructive with your questions and comments.