General SPI Mode questions

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
edebee
 
Posts: 17
Joined: Sun Mar 09, 2014 11:04 pm

General SPI Mode questions

Post by edebee »

Hey guys I have a couple general SPI questions. Thanks.

1. Is there a way to add an SPI bus to a Microcontroller? Can you somehow add with external hardware? An example would be adding a RP2040 to an RPI and make use of the extra SPI buses via the RPI?

2. I have an SPI slave device that only operates in SPI mode 1. The microcontroller only operates in SPI mode 0 and 2. Can I add through hardware or software a way to make the slave compatible with the microcontroller. I have sorta looked into the software option and it seems like if there is a hardware way to accomplish this it would work better for the project. I read somewhere that I could just add an inverter to change the pha and pol. Is this correct?

User avatar
mikeysklar
 
Posts: 18642
Joined: Mon Aug 01, 2016 8:10 pm

Re: General SPI Mode questions

Post by mikeysklar »

There are SPI GPIO expanders. Adafruit does not sell them and I've not use them. The MCPS2S17 is what I would look at for a hardware option.

It is common to use software SPI and bitbang your way through if you need more ports.

You can work around SPI mode by using bitbang SPI, manual toggle of the CS chip or hardware inverters like the 74HC04.

Post Reply
Please be positive and constructive with your questions and comments.

Return to “General Project help”