which SPI mode is this

Discussion in 'Embedded Systems and Microcontrollers' started by Vindhyachal Takniki, Jun 1, 2015.

  1. Vindhyachal Takniki

    Thread Starter Member

    Nov 3, 2014
    349
    6
    1. I have a slave device running on SPI which needs to communicate with MCU.
    2. I need to set MCU SPI mode.
    3. Which SPI mode is this. I think its SPI mode 1.

    Edit: Below pic I found in slave datasheet

    Untitled.png
     
    Last edited: Jun 1, 2015
  2. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,507
    380
    Hi,
    Look at page #23-11 of this PDF.
    E
     
  3. mitko89

    Member

    Sep 20, 2012
    123
    19
  4. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    I don't think this is SPI at all, if you want to use common microcontrollers to interface with it. It seems as if you clock in 18 bits on SDI, and then the output bits begin--that is a long way from standard. Normally you'd send and receive 8 bits simultaneously, but maybe there's a processor somewhere that has "programmable SPI" that lets you select everything. If you're bit-banging it, then you just follow the diagram and it is what it is, SPI or something unique.
     
  5. RamaD

    Active Member

    Dec 4, 2009
    254
    33
    • [​IMG] Remove John P, 27 minutes ago, which SPI mode is this
      It seems as if you clock in 18 bits on SDI, and then the output bits begin
    It is 24 bits. Sure enough, I7 and 17 look the same!
     
  6. JWHassler

    Member

    Sep 25, 2013
    201
    33
    Yabbut... there's 32 clocks?!
     
  7. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
  8. Vindhyachal Takniki

    Thread Starter Member

    Nov 3, 2014
    349
    6
    @mitko89 , I think its mode1 because transmitter data i.e which is master have valid data on falling edge of clk.
     
  9. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,913
    2,187
Loading...