spi and chip select

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
smhodge
Posts: 86
Joined: Tue Jan 22, 2019 2:16 am
Location: Kirkland, WA, USA

spi and chip select

Post by smhodge » Tue Jan 22, 2019 2:39 am

It appears the /SS line is not implemented. Am I correct that one can just use any available digital output pin as a chip select, driving it low with pin.value(0) to select the desired device on the SPI bus?

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: spi and chip select

Post by chrismas9 » Tue Jan 22, 2019 12:53 pm

Yes, you can use any GPIO in SPI master mode and you can have multiple devices on same SPI buss each with their own GPIO CS. SS is only needed in slave mode where it is an input to the SPI block.

smhodge
Posts: 86
Joined: Tue Jan 22, 2019 2:16 am
Location: Kirkland, WA, USA

Re: spi and chip select

Post by smhodge » Sat Jan 26, 2019 2:22 am

Thanks, especially for the tip on Slave use, even though that's unlikely for me, it's good to know.

Post Reply