Spi engine
Hello all,
I need help with configuring my propeller Stick to be able to read from a IMU in SPI protocol. I need to write to this sensor 6 bytes and at the same time read 6 bytes but I'm not able to do this simultaneously. The reason to do it like this is the SPI protocol.
Thanks,
Hector.
I need help with configuring my propeller Stick to be able to read from a IMU in SPI protocol. I need to write to this sensor 6 bytes and at the same time read 6 bytes but I'm not able to do this simultaneously. The reason to do it like this is the SPI protocol.
Thanks,
Hector.

Comments
pub spi(bOut) | bIn bIn~ repeat 8 outa[noparse][[/noparse]MOSI] := bOut & %1 ' output bit, LSBFIRST bOut >>= 1 ' prep for next cycle outa[noparse][[/noparse]CLK]~~ ' CLK high bIn := (bIn >> 1) | (ina[noparse][[/noparse]MISO] << 7) ' get bit, LSBFIRST outa[noparse][[/noparse]CLK]~ ' CLK low return bIn▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA