所有零都是有效的 SPI read/write 数据吗?
Are all zeros valid SPI read/write data?
如果是,硬件如何知道是否真的有数据,因为 MOSI/MISO 线上的电平永远不会改变。
我假设 SPI 是指串行外设接口。
根据维基百科,数据是这样发送的:
During each SPI clock cycle, a full duplex data transmission occurs. The master sends a bit on the MOSI line and the slave reads it, while the slave sends a bit on the MISO line and the master reads it. This sequence is maintained even when only one-directional data transfer is intended.
(https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Data_transmission).
因为它与时钟一起工作,所以发送(仅)零应该可以。
除此之外,使用 Manchester code 之类的东西,MOSI/MISO 行会发生变化。不过,我不确定这是否可以与串行外设接口一起使用。
如果是,硬件如何知道是否真的有数据,因为 MOSI/MISO 线上的电平永远不会改变。
我假设 SPI 是指串行外设接口。
根据维基百科,数据是这样发送的:
During each SPI clock cycle, a full duplex data transmission occurs. The master sends a bit on the MOSI line and the slave reads it, while the slave sends a bit on the MISO line and the master reads it. This sequence is maintained even when only one-directional data transfer is intended.
(https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Data_transmission).
因为它与时钟一起工作,所以发送(仅)零应该可以。
除此之外,使用 Manchester code 之类的东西,MOSI/MISO 行会发生变化。不过,我不确定这是否可以与串行外设接口一起使用。