You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I think there are two main issues here:

    • In SPI, MISO = Master In Slave Out - so you just have to connect MISO on the chip to MISO on Espruino (and you've connected to MOSI, which is an output on Espruino). Try using B4 instead.
    • SPI.send sends only 8 bits, regardless of the number you put in. Instead, you'd have to send 4 sets of 8 bits and recombine them: var d = SPI1.send([0,0,0,0],C0); result = (d[0]<<24)|(d[1]<<16)|(d[2]<<8)|d[3];

    Otherwise it's doing what you expect - C0 will be taken low, data clocked in/out, and then C0 is taken high again.

About

Avatar for Gordon @Gordon started