Hello, Because you are the master, you will need to provide the clock so the slave can send its data. For example, the following function transmits a dummy 0xFF and then it reads the RX buffer int spi_Read(unsigned char *pBuff, int len) { int i = 0; ASSERT_CS(); for (i = 0; i < len; i ++) { while (!(UCB0IFG&UCTXIFG)); UCB0TXBUF = 0xFF; while (!(UCB0IFG&UCRXIFG)); pBuff[i] = UCB0RXBUF; } DEASSERT_CS(); return len; } Hopefully this helps. David
↧