877a and SPI


Closed Thread
Results 1 to 13 of 13

Thread: 877a and SPI

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    38

    Question 877a and SPI

    I am looking for code examples to use SPI on the 877a I have searched a few times but the search engine complains that SPI is too short.

    My long term goal is to interface with one of the dos on chip IC for sd cards available from sparkfun.com .

    I have a project working using serial comm to a PC what I would like is the option to datalog using SPI so that I dont interfere with my serial link to the PC.

    Any help would be greatly appreciated.
    Thanks in advance.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tico View Post
    I am looking for code examples to use SPI on the 877a I have searched a few times but the search engine complains that SPI is too short.

    My long term goal is to interface with one of the dos on chip IC for sd cards available from sparkfun.com .

    I have a project working using serial comm to a PC what I would like is the option to datalog using SPI so that I dont interfere with my serial link to the PC.

    Any help would be greatly appreciated.
    Thanks in advance.
    http://www.picbasic.co.uk/forum/showthread.php?t=4751

  3. #3
    Join Date
    Dec 2006
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    Thanks for the quick reply but still cant seem to find an example.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tico View Post
    Thanks for the quick reply but still cant seem to find an example.
    Check the little green book, enough examples in there to get you started.

  5. #5
    Join Date
    Dec 2006
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    So since its to the manual should I use hserin or shiftin. I am wrapping my head around this.

    I have also found this example from melabs
    http://www.melabs.com/resources/samples/pbp/spimast.bas

    Since I am new to SPI am I correct that the PIC is the master and the SD card is the slave.

    I am just looking for a recomended starting point so I dont spin my wheels more that I already have.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tico View Post
    So since its to the manual should I use hserin or shiftin. I am wrapping my head around this.
    I am just looking for a recomended starting point so I dont spin my wheels more that I already have.
    Simple things first. The DOSonChip datasheets says it'll handle UARTs, SPI (I2C/SMBus coming soon).
    Stick with the simplest first...Serial ports...fast, easy to handle, built in string handling in PBP, well documented, easy for a beginner, fast enough with the right code, the right processor, etc. I believe, SPI is overkill in this situation.
    So, go with serial. SerIn/SerOut, SerIn2/SerOut2, HSerIn/HSerOut, any one of those combinations will work just fine, no matter what PIC, no matter what speed (up to a point of course). Pretty much it depends on how well and how efficiently you can write your code.

  7. #7
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile site search

    Hi tico,

    Quote Originally Posted by tico View Post
    Thanks for the quick reply but still cant seem to find an example.
    Paste this into your Google search engine.
    Code:
    spi site:http://www.picbasic.co.uk/forum/
    
    or
    
    spi pic16f876a site:http://www.picbasic.co.uk/forum/

    hope that helps

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  8. #8
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tico View Post
    I am looking for code examples to use SPI on the 877a I have searched a few times but the search engine complains that SPI is too short.

    My long term goal is to interface with one of the dos on chip IC for sd cards available from sparkfun.com .

    I have a project working using serial comm to a PC what I would like is the option to datalog using SPI so that I dont interfere with my serial link to the PC.

    Any help would be greatly appreciated.
    Thanks in advance.
    SPI is only 3 letters and the search engine wants 4 so add a wildcard to your search: SPI* and you will get everything that starts with spi - maybe useful, or not.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Use the PIC 16f877 or 877A instead of shift registers.
    By tsanders in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2006, 17: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