Hi,
I'm using MMA6900KQ accelerometer and can't read acceleration data. Because I use an 8-bit MCU, its SPI data register is also 8-bit. When sending commands, only 8-bits can be sent at a time, while the commands of MMA6900KQ are 16-bits. Can I send it twice, sending the high 8 bits first, then the low 8 bits? Or is there any other workaround? Similarly, when reading the data register of SPI to receive the data of MMA6900KQ, I can only read 8 bits at a time. Can I read the high 8 bits and then the low 8 bits?
Hi Liuliu,
You are right that all SPI transfers are 16-bits lenght, but I guess you can use an 8-bit MCU, just make sure there is no CS transition between the first and second byte. In other words, you will have to drive the CS pin manually as a GPO pin which goes low at the beginning of the transfer and high after sending all 16 bits.
Best regards,
Tomas
Hi Tomas,
I have received your reply, thank you very much. Next I will test it according to your method. If this method is not successful, I may need your help in the future.
Best regards,
Liuliu
发自我的iPhone