- Wed Apr 13, 2016 6:18 pm
#189375
I am hoping to get two SparkFun SAMD21 Dev Breakout boards to talk to one another through SPI.
I found some information on how to do this with Arduinos here: http://www.gammon.com.au/spi
However I am getting stuck at setting up the slave.
The code used in the post:
Page 481 of the SAMD21 datasheet has some information, looks like I need to write to to some registers (CTRLA) but I am not sure how to do this, nor what values to write.
Any help would be much appreciated.
I found some information on how to do this with Arduinos here: http://www.gammon.com.au/spi
However I am getting stuck at setting up the slave.
The code used in the post:
Code: Select all
Appears to only work on boards that use other chips. // turn on SPI in slave mode
SPCR |= _BV(SPE);
Page 481 of the SAMD21 datasheet has some information, looks like I need to write to to some registers (CTRLA) but I am not sure how to do this, nor what values to write.
Any help would be much appreciated.