Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

trinket m0 simultaneous spi and i2c
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

trinket m0 simultaneous spi and i2c

by FishEatPork on Wed Jul 29, 2020 12:08 pm

Hi all, On the Trinket m0 pin out page it says the I2C clock (SCL) and hardware SPI MISO are on the same pin. I'm wondering it this means I can't use SPI and I2c simultaneously. For my project I want to use this board as a SPI slave and I2C master. Is this possible? Thanks!

FishEatPork
 
Posts: 10
Joined: Fri Apr 03, 2020 8:15 pm

Re: trinket m0 simultaneous spi and i2c

by mikeysklar on Wed Jul 29, 2020 12:49 pm

Yes, you can wire up both I2C and SPI devices on the same pins. However, you would not want to be communicating both protocols at the same time. I would use SPI with chip select so you can make SPI inactive when communicating via I2C.

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

Re: trinket m0 simultaneous spi and i2c

by michaelmeissner on Sun Aug 02, 2020 2:00 pm

I suspect the simplest approach is to switch microprocessors to one with a larger form factor that allows both I2C and SPI on separate pins.

Possibly:

I've not used the ItsyBitsy, but it is the smallest of the 3 (and the cheapest). I do use the Teensy 3.2 and 4.0, which has the same form factor as the ItsyBitsy.

I have used several of the feather boards, and they use a common pinout, which means there are various feather wings (shields) that can provide additional flexibility as your project grows.

The Metro boards use the pinout of the original Arduino processors, which means there are various add-ons available, though it is the largest form factor. You do have to be careful if you try to use older Arduino shields, as the original Arduino was 5v only, the M0 board is 3.3v. Newer shields presumably can run on both 3.3v and 5v.

michaelmeissner
 
Posts: 1420
Joined: Wed Aug 29, 2012 12:40 am

Please be positive and constructive with your questions and comments.