hello i've modified the library to use the spi with gpio pins but im unable to get communication. after probing the bus i noticed that the Mosi line idles lows and our select Is triggering before the Mosi rises to begin transmission.
is there a way to set the Mosi to idle high instead of low or is there a flag that is set to tell me when the transmission is going to begin i.e. once the Mosi exits idle.
已解决! 转到解答。
Hi,
I suppose that the SPI is in master mode, in the case, the MOSI, /CS and SCK are output signals. while the /CS(chip select) is high, I suppose that the MOSI is float, because there is not data transfer during the time, it does matter whether the MOSI is high or low. When the /CS is low, the MOSI pin is driven by master, it represents the data with the SCK.
If you want the MOSI signal is high when the /CS is high, I suppose you can try to connect a 10K ohm pull-up resistor on the MOSI pin, pls have a try.
Hope it can help you
BR
XiangJun Rong
Hi,
I suppose that the SPI is in master mode, in the case, the MOSI, /CS and SCK are output signals. while the /CS(chip select) is high, I suppose that the MOSI is float, because there is not data transfer during the time, it does matter whether the MOSI is high or low. When the /CS is low, the MOSI pin is driven by master, it represents the data with the SCK.
If you want the MOSI signal is high when the /CS is high, I suppose you can try to connect a 10K ohm pull-up resistor on the MOSI pin, pls have a try.
Hope it can help you
BR
XiangJun Rong