SPI on a pic without hardware SPI?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005
    Posts
    96

    Default SPI on a pic without hardware SPI?

    Does anyone know if the Shiftout command is a software version of SPI and if it can be used to make SPI eeprom and other devices work on microchips that don't specifically have hardware SPI?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Yes. Look at a few of the MeLabs examples using shiftout/shiftin for SPI EEPROM.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by modifyit
    Does anyone know if the Shiftout command is a software version of SPI and if it can be used to make SPI eeprom and other devices work on microchips that don't specifically have hardware SPI?
    Yep. I've used it to communicate with SD cards, ALFAT SD and SPI peripherals without hardware implementation. Pay attention to clock polarity, and if the device validates the data before the clock change,or after. The only down side, besides speed, is you can't shiftin data while you're shifting out. Many devices send data at the same time you are shifting data into them. You will also need to dedicate a pin to select the device before a transfer.

  4. #4
    Join Date
    Apr 2005
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Great thanks for the confirmation

Similar Threads

  1. SPI Communication between two pic 16f877
    By anti83 in forum Serial
    Replies: 1
    Last Post: - 5th July 2008, 22:06
  2. 16-bit SPI problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th June 2008, 16:42
  3. Hardware SPI with MAX3111E
    By KHsu in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th August 2007, 02:42
  4. SPI configuration PIC versus Atmel
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th July 2007, 20:17
  5. SPI PIC to PIC Bi-Directional Communication
    By CocaColaKid in forum Serial
    Replies: 5
    Last Post: - 23rd December 2006, 23:44

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts