Arduino Code for Thought (spi slave)

Posted by & filed under Dorkbot.

This is something to chew on while I put together some bigger pieces.

See also AVR151 at http://www.atmel.com/dyn/products/app_notes.asp?family_id=607

/*
* This program lights pins 2-9 with data recieved via the spi port.
* it also resends the bytes back through the port.
*
* Based on Atmel application note avr151.
*
* Donald Delmar Davis, Tempus Dictum, Inc.
*/
#define SPI_SCK 13
#define SPI_MISO 12
#define SPI_MOSI 11
#define SPI_SS 10

void SPI_Init(void);