Reference.SPITransfer History

Hide minor edits - Show changes to output

October 19, 2012, at 09:46 PM by Scott Fitzgerald -
Changed lines 38-40 from:
*SPI_LAST: the SS pin returns to high after one byte has been transferred.
Optional, if omitted defaults to SPI_LAST
(:cell:) (''Arduino Due only'')
to:
*SPI_LAST: ''default if not specified'' the SS pin returns to high after one byte has been transferred.
(:cell:) (''Optional, Arduino Due only'')
Deleted line 44:
September 17, 2012, at 06:53 PM by Cristian -Vacuum- Maglie -
Changed lines 44-46 from:
the byte read from the bus
to:
the byte read from the bus.

September 17, 2012, at 06:51 PM by Cristian -Vacuum- Maglie -
Changed lines 9-15 from:
''Arduino Due''\\
A slave select pin on the Due allows several devices to share the SPI connection. If a slave select pin is specified in the call to SPI.transfer(), only the specified pin is pulled low before the transfer occurs.

The SPI_CONTINUE and SPI_LAST parameters are used to manage the Slave Select line. SPI_CONTINUE keeps the specified SS pin low after transmitting a byte, enabling the Due to send additional bytes via the transfer() function without terminating the connection. The last byte to be transferred should be accompanied by the SPI_LAST parameter.

By default, the value is SPI_LAST, because it is common for SPI devices to send only one byte at a time. When a transfer is complete with SPI_LAST, the slave select pin returns to high.
to:
''Extended method for Arduino Due''\\
If you specify one of the Arduino Due's Slave Select (SS) pin in the call to SPI.transfer(), the specified pin is activated (pulled low) before the transfer occurs and deactivated (pulled high) when the transfer is finished.

You can use an additional SPI_CONTINUE or SPI_LAST parameter to manage the Slave Select line after the transfer. SPI_CONTINUE keeps the specified SS pin active (low) after the transfer to allow the send of additional bytes via the transfer() function in the '''same SPI transaction'''. The last byte to be transferred should be accompanied by the SPI_LAST parameter. By default, if you don't specify a third parameter, SPI_LAST is used. When a transfer is complete with SPI_LAST, the slave select pin returns inactive (high).

More info on extended methods: [[DueExtendedSPI | Due Extended SPI usage]]
Added lines 20-21:
(:cellnr width=400px:) SPI.transfer(slaveSelectPin, val)
(:cell:) (''Arduino Due only'')
Deleted lines 23-24:
(:cellnr width=400px:) SPI.transfer(val, transferMode)
(:cell:) (''Arduino Due only'')
Changed lines 33-34 from:
(:cell width=240px:) slave device SS pin\\
Optional, if omitted defaults to pin 52
to:
(:cell width=240px:) slave device SS pin
Deleted line 38:
Deleted lines 44-45:

!!!!Example
September 11, 2012, at 10:13 PM by Scott Fitzgerald -
Changed lines 39-40 from:
*SPI_LAST: the SS pin returns to high level after one byte has been transferred.
to:
*SPI_LAST: the SS pin returns to high after one byte has been transferred.
September 11, 2012, at 10:12 PM by Scott Fitzgerald -
Changed line 38 from:
*SPI_CONTINUE: keeping low the SS pin allowing another subsequent byte transfer.
to:
*SPI_CONTINUE: keeps the SS pin low, allowing a subsequent byte transfer.
September 11, 2012, at 10:07 PM by Scott Fitzgerald -
Changed lines 9-12 from:
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 transfer(), the pin is pulled low (activating the relevant SPI device) before the transfer occurs.

The SPI_CONTINUE and SPI_LAST parameters are used to manage the Slave Select line, that can be kept at a low level using the SPI_CONTINUE parameter. Keeping selected the slave device the Due is able to use subsequent instances of the transfer() function, until the last byte to be transferred that must be accompained by the SPI_LAST parameter. If you don't specify the parameter by default the value is SPI_LAST, because is most common for SPI devices to send one byte per time. The Slave Select pin returns to the high level when the transfer is completed.
to:
''Arduino Due''\\
A slave select pin on the Due allows several devices to share the SPI connection. If a slave select pin is specified in the call to SPI.transfer(), only the specified pin is pulled low before the transfer occurs.

The SPI_CONTINUE and SPI_LAST parameters are used to manage the Slave Select line. SPI_CONTINUE keeps the specified SS pin low after transmitting a byte, enabling the Due to send additional bytes via the transfer() function without terminating the connection. The last byte to be transferred should be accompanied by the SPI_LAST parameter.

By default, the value is SPI_LAST, because it is common for SPI devices to send only one byte at a time. When a transfer is complete with SPI_LAST, the slave select pin returns to high.
September 04, 2012, at 03:34 PM by Federico -
Changed lines 9-10 from:
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 transfer(), the pin is pulled low (activating the relevant SPI device) before the transfer occurs
to:
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 transfer(), the pin is pulled low (activating the relevant SPI device) before the transfer occurs.

The SPI_CONTINUE and SPI_LAST parameters are used to manage the Slave Select line, that can be kept at a low level using the SPI_CONTINUE parameter. Keeping selected the slave device the Due is able to use subsequent instances of the transfer() function, until the last byte to be transferred that must be accompained by the SPI_LAST parameter. If you don't specify the parameter by default the value is SPI_LAST, because is most common for SPI devices to send one byte per time. The Slave Select pin returns to the high level when the transfer is completed.
Changed lines 35-37 from:
*SPI_CONTINUE: this parameter keep low the SS pin allowing another subsequent byte transfer.
*SPI_LAST: tell to the SPI interface that is the last one byte to be transferred then the SS pin can return to the high level.
to:
*SPI_CONTINUE: keeping low the SS pin allowing another subsequent byte transfer.
*SPI_LAST: the SS pin returns to high level after one byte has been transferred.
September 03, 2012, at 04:37 PM by Federico -
Added lines 9-10:
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 transfer(), the pin is pulled low (activating the relevant SPI device) before the transfer occurs
Changed line 29 from:
If omitted will be loaded the default SS pin value that is the 52
to:
Optional, if omitted defaults to pin 52
Changed lines 33-35 from:
*SPI_CONTINUE
*SPI_LAST
If omitted will be loaded the default that is SPI_LAST
to:
*SPI_CONTINUE: this parameter keep low the SS pin allowing another subsequent byte transfer.
*SPI_LAST: tell to the SPI interface that is the last one byte to be transferred then the SS pin can return to the high level.

Optional, if omitted defaults to SPI_LAST
August 31, 2012, at 12:09 PM by Federico -
Changed lines 11-12 from:
SPI.transfer(val)
to:
(:table border=0 cellpadding=5 cellspacing=0 width=80%:)
(:cell width=400px:) SPI.transfer(val)
(:cellnr width=400px:) SPI.transfer(slaveSelectPin, val, transferMode)
(:cell:) (''Arduino Due only'')
(:cellnr width=400px:) SPI.transfer(val, transferMode)
(:cell:) (''Arduino Due only'')
(:tableend:)
Changed lines 20-21 from:
val: the byte to send out over the bus
to:

(:table border=0 cellpadding=5 cellspacing=0 width=80%:)
(:cell width=150px:) val:
(:cell width=240px:)
the byte to send out over the bus
(:cellnr width=150px:) slaveSelectPin:
(:cell width=240px:) slave device SS pin\\
If omitted will be loaded the default SS pin value that is the 52
(:cell:)(''Arduino Due only'')
(:cellnr width=150px:) transferMode:
(:cell width=240px:)
*SPI_CONTINUE
*SPI_LAST
If omitted will be loaded the default that is SPI_LAST
(:cell:) (''Arduino Due only'')
(:tableend:)
Changed lines 40-41 from:
!!!!Example
to:
!!!!Example
August 10, 2010, at 04:25 AM by David A. Mellis -
Added lines 1-20:
[[SPI]]

!!transfer()

!!!!Description

Transfers one byte over the SPI bus, both sending and receiving.

!!!!Syntax

SPI.transfer(val)

!!!!Parameters
val: the byte to send out over the bus

!!!!Returns
the byte read from the bus

!!!!Example

Share