Hide minor edits - Show changes to markup
Arduino Due only
SPI.begin() can take an optional argument, configuring the pin to be managed as an additional SS pin by the SPI interface. When configuring a new SS pin, the frequency reverts to the default of 500 KHz. This can be changed with SPI.setClockDivider().
Extended method for Arduino Due
If you specify one of the Arduino Due's Slave Select (SS) pin in the call to SPI.begin(), the pin is configured to be directly managed by the SPI interface.
Note that once the pin is configured, you can't use it anymore as a general I/O, unless you call the SPI.end() method on the same pin.
The only pins that can be configured to be managed by SPI interface are the Arduino Due's Slave Select pins: 4, 10, 52 and 78.
More info on extended methods: Due Extended SPI usage
(:cell width=150px:) None
The default SCK frequency on almost all Arduino boards is 4 MHz. The Due is the exception, with a default frequency of 500 KHz.
SPI.begin() can take an optional argument, configuring the pin to be managed as an additional SS pin by the SPI interface.
SPI.begin() can take an optional argument, configuring the pin to be managed as an additional SS pin by the SPI interface. When configuring a new SS pin, the frequency reverts to the default of 500 KHz. This can be changed with SPI.setClockDivider().
The default SCK frequency is set to 4 MHz. For the Due with extended methods the default frequency is 500 KHz.
The default SCK frequency on almost all Arduino boards is 4 MHz. The Due is the exception, with a default frequency of 500 KHz.
Arduino Due only
Arduino Due only\\
Initializes the SPI bus, setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low and SS high. Default SCK frequency is setted to 4 MHz. For the Due with Extended methods the default frequency is 500 KHz.
A slave select pin allows several devices to share the SPI connection. It is connected to the slave select or chip select pin of an SPI device. If a slave select pin is specified in the call to begin(), the pin is configured to be managed by the SPI interface.
Initializes the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high.
The default SCK frequency is set to 4 MHz. For the Due with extended methods the default frequency is 500 KHz.
Arduino Due only SPI.begin() can take an optional argument, configuring the pin to be managed as an additional SS pin by the SPI interface.
(:cell width=400px:) None (:cellnr width=400px:) slaveSelectPin
(:cell width=150px:) None (:cellnr width=150px:) slaveSelectPin: (:cell width=240px:) slave device SS pin
A slave select pin allows several devices to share the SPI connection. It is connected to the slave select or chip select pin of an SPI device. If a slave select pin is specified in the call to end(), the SPI communication with the specified device is going to be closed.
A slave select pin allows several devices to share the SPI connection. It is connected to the slave select or chip select pin of an SPI device. If a slave select pin is specified in the call to begin(), the pin is configured to be managed by the SPI interface.
A slave select pin allows several devices to share the SPI connection. It is connected to the slave select or chip select pin of an SPI device. If a slave select pin is specified in the call to begin(), the pin is configured to be managed by the SPI interface.
A slave select pin allows several devices to share the SPI connection. It is connected to the slave select or chip select pin of an SPI device. If a slave select pin is specified in the call to end(), the SPI communication with the specified device is going to be closed.
A slave select pin allows several devices to share the SPI connection. It is connected to the slave select or chip select pin of an SPI device. If a slave select pin is specified in the call to begin(), the pin is configured to be managed by the SPI interface.
(:table border=0 cellpadding=5 cellspacing=0 width=50%:) (:cell width=200px:) SPI.begin() (:cellnr width=200px:) SPI.begin(slaveSelectPin)
(:table border=0 cellpadding=5 cellspacing=0 width=80%:) (:cell width=400px:) SPI.begin() (:cellnr width=400px:) SPI.begin(slaveSelectPin)
(:table border=0 cellpadding=5 cellspacing=0 width=50%:) (:cell width=200px:) None (:cellnr width=200px:) slaveSelectPin
(:table border=0 cellpadding=5 cellspacing=0 width=80%:) (:cell width=400px:) None (:cellnr width=400px:) slaveSelectPin
Default SCK frequency is setted to 4 MHz. For the Due the default frequency is 500 KHz.
Default SCK frequency is setted to 4 MHz. For the Due with Extended methods the default frequency is 500 KHz.
Default SCK frequency is setted to 500 kHz.
Default SCK frequency is setted to 4 MHz. For the Due the default frequency is 500 KHz.
SPI.begin()
Arduino Due only:
SPI.begin(SS_pin)
In the extended mode you can specify which device to initialize by adding the Slave Select pin number on which the device is physically connected. For further information, please read the page of the Extended SPI mode.
(:table border=0 cellpadding=5 cellspacing=0 width=50%:) (:cell width=200px:) SPI.begin() (:cellnr width=200px:) SPI.begin(slaveSelectPin) (:cell:) (Arduino Due only) (:tableend:)
(:table border=0 cellpadding=5 cellspacing=0 width=50%:) (:cell width=200px:) None (:cellnr width=200px:) slaveSelectPin (:cell:) (Arduino Due only) (:tableend:)
Arduino Due only:
SS_pin: is the pin number on which the slave SPI device is connected. The only available pins for this mode are digital pins: 4, 10, 52.
None
Initializes the SPI bus, setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low and SS high.
Initializes the SPI bus, setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low and SS high. Default SCK frequency is setted to 500 kHz.
Arduino Due only:
SPI.begin(SS_pin)
In the extended mode you can specify which device to initialize by adding the Slave Select pin number on which the device is physically connected. For further information, please read the page of the Extended SPI mode.
Arduino Due only:
SS_pin: is the pin number on which the slave SPI device is connected. The only available pins for this mode are digital pins: 4, 10, 52.