1

I'm trying to use an Arduino as a slave and was searching for examples which I found many. But apart from the examples, I haven't found any documentation explaining many thing that show up in those examples.

For example, I'd like a document that would state what things like the following are:
-SPCR
-SPE
-SPDR
-ISR
-SPI_STC_vect

I'm asking this, because I don't and can't just copy an example and hope that it'll work, I really need to know what I'm doing.

Thank you,
João

2 Answers2

2

You are confusing SPI, a de facto standard, with the Arduino/Atmel hardware support for SPI.

SPCR, SPE and SPDR are registers of the Atmel MCU, part of the hardware support.

ISR is Interrupt Service Routine and SPI_STC_vect is the vector that point to that code. That is where the data received from the cable is read finally.

1

Take a look at Nick Gammon's SPI explanations also. Very good, with timing explained as well.

http://www.gammon.com.au/spi

CrossRoads
  • 2,449
  • 7
  • 9