Hardware SPI ?


Closed Thread
Results 1 to 4 of 4

Thread: Hardware SPI ?

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Hardware SPI ?

    Hi henrik ,

    I have the option of using the hardware spi for the cpu driving 2 x spi bused devices ( SD Card , RF module) with individual select pins for each.

    to date i have found the shiftout/ shiftin arrangements have worked well for the RF spi device and i have the code
    but not tried its with 2 or more SPI , so far or used the registers for the spi HARDWARE.

    i am wondering is there any advantage for multi SPI devices to use the hardware SPI than just use the software SPI in this case , and getting it to work using the hardware SPI

    Cheers

    Sheldon

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,627


    Did you find this post helpful? Yes | No

    Default Re: Hardware SPI ?

    Hi,
    The obvious benefit is speed. The hardware SPI is (or can be) SO much faster than using the bit-banged routines. Then of course you can run it interrupt driven so it does its thing in the background instead "blocking" the processor. Then again, it's so fast that there might not be any benefit in using interrupts. It all depends on the amount of data to process etc etc...

    Using SHIFTIN/SHIFTOUT you can still have both devices on the same clock and data pins and run separate CS lines to each, just as you would with the hardware SPI, no special need to use a separate set of pins.

    /Henrik.

Similar Threads

  1. Hardware SPI with AD7680 16 bit ADC
    By Castor in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd June 2008, 09:01
  2. Hardware SPI with MAX3111E
    By KHsu in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th August 2007, 01:42
  3. SPI on a pic without hardware SPI?
    By modifyit in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 26th April 2006, 13:29
  4. how can i use I2C and SPI hardware
    By micro in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd December 2005, 15:33
  5. Hardware SPI
    By Ron Marcus in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th June 2005, 14:23

Members who have read this thread : 0

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