+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Junior Member level 3
    Points: 236, Level: 2

    Join Date
    Jul 2018
    Posts
    28
    Helped
    0 / 0
    Points
    236
    Level
    2

    [PIC] how to use extended SPI instead of normal SPI

    From what I understand, the Extended SPI is like SPI but with extra data line.
    Micron extended SPI protocol is the standard SPI protocol with additional commands
    that extend functionality and enable address or data transmission on multiple DQn
    lines.
    To initiate a command, S# is driven LOW. For extended SPI protocol, input is on DQ0/
    DQ4, output on DQ1/DQ5.
    I wonder how do I support it on PIC and mikroC?
    There is a "simple" SPI library for that:
    https://download.mikroe.com/document...pi_library.htm
    Do I have to somehow extend the hardware SPI of PIC18F, or create software SPI using any selected digital pins and write whole SPI system from scratch in my code?

    I am looking at the datasheet.
    The signals for READ ID command:
    Click image for larger version. 

Name:	extendedSPI.png 
Views:	5 
Size:	110.3 KB 
ID:	150413
    The pinout of chip:
    Click image for larger version. 

Name:	extendedSPI2.png 
Views:	3 
Size:	52.7 KB 
ID:	150414
    For me, it looks like I can do "READ ID" in "Extended" mode just by using 4 signals: Clock (C_1), DQ0, DQ1 and S (obviously). I don't get where is the extra line needed.

    My question is: where is mistake in my understanding. Can I do "READ ID" command from screenshots with simple MikroC SPI library?

    PS: I attach the source datasheet of screenshots.
    MICT-S-A0002963421-1.pdf

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 250,892, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    43,678
    Helped
    13284 / 13284
    Points
    250,892
    Level
    100

    Re: [PIC] how to use extended SPI instead of normal SPI

    The question doesn't make sense. Dual and quad SPI functions are only relevant to increase the interface throughput with SPI masters that support multiple data lines. PIC processors don't, but any flash memory function of interest can be accessed through single SPI as well, e.g. read ID.



    •   AltAdvertisment

        
       

  3. #3
    Junior Member level 3
    Points: 236, Level: 2

    Join Date
    Jul 2018
    Posts
    28
    Helped
    0 / 0
    Points
    236
    Level
    2

    Re: [PIC] how to use extended SPI instead of normal SPI

    Quote Originally Posted by FvM View Post
    PIC processors don't, but any flash memory function of interest can be accessed through single SPI as well, e.g. read ID.

    So you say that I can do "read ID" for chip from datasheet from first post with PIC mcu with hardware SPI?



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 250,892, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    43,678
    Helped
    13284 / 13284
    Points
    250,892
    Level
    100

    Re: [PIC] how to use extended SPI instead of normal SPI

    So you say that I can do "read ID" for chip from datasheet from first post with PIC mcu with hardware SPI?
    Yes, as described in the datasheet.

    By the way, it's not clear which chip type you are using. There's a single chip select version of the dual die memory which isn't well suited to be accessed with a classical SPI interface.



--[[ ]]--