arduino spi

I have looked but not understood.

What do you not understand?

What you want to show there to me?

Did you look at the reference page of SPI and beginTransaction() in particulate?

Yes, it is written that in SPI.beginTransacton() function we can use the SPI setting.

No, it doesn't say that. It says that you MUST use a SPISettings as parameter. It also tells you you must call it before you can do any SPI transfer :wink:

Means how it can be? Can you give some example,please.

I indeed see the IDE examples are lacking…

Here you go:

#include <SPI.h>

const SPISettings DeviceSettings(1000000, MSBFIRST, SPI_MODE1);

void setup() {
  Serial.begin(115200);
  SPI.begin();
  digitalWrite(SS, HIGH);
}

void loop() {
  sendSomeCrap();
  delay(1000);
}

void sendSomeCrap(){
  SPI.beginTransaction(DeviceSettings);
  digitalWrite(SS, LOW);
  SPI.transfer(0xAB);
  digitalWrite(SS, HIGH);
  SPI.endTransaction();  
}

Thanks for guiding me.

One more question please,
If a device pin configuration is active low and open drain then how can we read it is high or low.means how can we connect it with arduino?

(This is the configuration of pin 8 of tdc7200 ic.)

I am connecting a pull-up register and trying to read the output but still in doubt.

Like any other thing that's open drain (like a switch ;)), use a pull up :slight_smile:

I not got what you are saying

I really can't say it anymore simple then "just use a pull up"...