CS pin in SPI (Slave)

SPI is a standard protocol and the slaves (standalone devices and sensors like BMP280, Fig-1) are designed to work following that standard. You don't have much choice to change the standard. You read the data sheets of the sensor and set the parameters accordingly in the Master sketch. You may play around with the setup of Fig-1.


Figure-1:

But, in this case, the Arduino is the "sensor" - the OP is trying to implement a Slave!

The trouble was that the bit-banged software implementation wasn't observing the CS (aka SS) line.
Using the hardware SPI does it "properly".

Arduino UNO-2 responds as SPI-Slave when SPI.h is included, SPI.begin() is not executed, MSTR-bit is zero, and MISO line is made output.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.