Skip to main content
Visitor II
December 10, 2003
Question

SPI Communiction

  • December 10, 2003
  • 3 replies
  • 811 views
Posted on December 10, 2003 at 10:56

SPI Communiction

    This topic has been closed for replies.

    3 replies

    Visitor II
    December 9, 2003
    Posted on December 09, 2003 at 08:38

    hello,

    i want work on Interfacing AT93C46 EEPROM with my Microcontroller (ST72F264) on my softec demo board. using SPI protocol.I have connected :

    PB7/SS pin to CS pin of AT93C46

    PB6/SCK pin to SK pin

    PB5/MISO pin to DO pin

    PB4/MOSI pin to DI pin

    VCC of AT93C46 is connected to 5v.

    is it ok??/

    In ST Application note AN970,diagram shows S pin of SPI EEPROM

    is connected to one I/O pin of ST7.

    and SS pin of ST7 is connected to VCC.

    Now pls tell me what is the difference between theses two schemetics.

    And tell me can i work on SPI ,the way i connected AT93C46 to ST7.

    or pls suggest me how to connect AT93C46 to ST72F264..

    As i m just learning pls tell me what all the issues i should consider in this application.I dont want use ST7 SPI internal register,instead want to write software code for communiction with eeprom

    thanks,

    Arup

    Visitor II
    December 9, 2003
    Posted on December 10, 2003 at 00:41

    I cannot find the AN970. I think the 2 sch are both right.

    You know, SPI com needs /SS, SCLK, SDO and SDI, the SPI controller in ST MCU can auto control these pins under correct setup. The /SS pin can be set to be a normal IO port , the /S signal can be output by a normal IO pin. You also can use 4 normal IO pins to simulate SPI.

    J.V.
    Visitor II
    December 10, 2003
    Posted on December 10, 2003 at 10:56

    Hello Arup,

    You can control SS pin either using software or hardware. It can be done using the SSM bit in the SPICSR register. So, if you control the SS pin using software then your SS pin is free to use as normal I/O port.

    lets say in your configuaration, you are connecting SS pin to the CS pin of the EEPROM. So in this case, you can select the micro in the master mode using software(bits SSM=1, SSI=1) and you are free to use the SS pin as normal I/O pin which is connected to CS pin.

    For detailed info, please refer datsheet and App note (AN970).