1. SPCR、SPSR、SPDR所指定的暫存器位址寫在 iom8.h2. 你可以直接給予數值3.
http://arduino.cc/en/Tutorial/SPIEEPROMSPCR| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0| SPIE | SPE | DORD | MSTR | CPOL | CPHA | SPR1 |SPR0SPIE - Enables the SPI interrupt when 1SPE - Enables the SPI when 1DORD - Sends data least Significant Bit First when 1,most Significant Bit first when 0MSTR - Sets the Arduino in master mode when 1, slavemode when 0CPOL - Sets the data clock to be idle when high if setto 1, idle when low if set to 0CPHA - Samples data on the falling edge of the dataclock when 1, rising edge when 0SPR1 and SPR0 - Sets the SPI speed, 00 is fastest(4MHz) 11 is slowest (250KHz)以上宣告在 io2333.h