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
    411
    11
    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
    3,324
    591
    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,671
    241
    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
    285
    38
    • [​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
    240
    42
    Yabbut... there's 32 clocks?!
     
  7. John P

    AAC Fanatic!

    Oct 14, 2008
    1,671
    241
  8. Vindhyachal Takniki

    Thread Starter Member

    Nov 3, 2014
    411
    11
    @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
    3,608
    3,738
Loading...