You are reading a single comment by @user7143 and its replies. Click here to read the full conversation.
  • I am trying to write code to connect a chip to the espruino but am really not getting how it works! I want to figure it out on my own but need some help. Hence the fact I am not stating what chip I am trying to interface too.

    The chip has three lines SCK, MISO, and CS.

    So I connect SCK to B3(sck on espruino), MISO to B5(miso on espruino)

    CS is connected to C0

    In the command line I write the following commands
    ///

    SPI1.setup({ mosi:B5, sck:B3, baud:1000000 });
    =undefined
    SPI1.send(0b00000,C0);
    =255

    ///

    The device should send back a 32 bit number.

    From my understanding reading the datasheet once the cs goes low the chip should start writing data to the espruino as the sck signal starts. Can anyone offer some pointers or explain the error in my understanding of SPI.

    Thanks.

About

Avatar for user7143 @user7143 started