---
+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 6
    Points: 1,136, Level: 7

    Join Date
    Dec 2006
    Posts
    11
    Helped
    0 / 0
    Points
    1,136
    Level
    7

    pic16f877 spi

    I am new to PIC and ask that does anyone knows the steps of SPI configuration
    for PIC16F877A.
    If possible gives some source code examples!
    Thanks!!!:D

    •   Alt16th January 2007, 05:54

      advertising

        
       

  2. #2
    Full Member level 4
    Points: 2,949, Level: 12
    Achievements:
    7 years registered

    Join Date
    Oct 2005
    Posts
    195
    Helped
    27 / 27
    Points
    2,949
    Level
    12

    spi pic16f877

    I configured a PIC16F873A for SPI interface with a MAX6952 after looking at the SPI EEPROM application note from Microchip. The routine provided needs a little modification for the number of bytes you want to send and clock speed.

    I'm at work so I don't have my code available.



    •   Alt16th January 2007, 11:41

      advertising

        
       

  3. #3
    Member level 2
    Points: 1,828, Level: 9
    king_rero's Avatar
    Join Date
    Sep 2005
    Posts
    51
    Helped
    2 / 2
    Points
    1,828
    Level
    9

    pic16f877a spi

    Quote Originally Posted by sora5563
    I am new to PIC and ask that does anyone knows the steps of SPI configuration
    for PIC16F877A.
    If possible gives some source code examples!
    Thanks!!!:D
    checkhttp://courses.ece.uiuc.edu/ece445/p...7_appendix.pdf



    •   Alt16th January 2007, 14:53

      advertising

        
       

  4. #4
    Full Member level 6
    Points: 5,207, Level: 17
    Buriedcode's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    357
    Helped
    43 / 43
    Points
    5,207
    Level
    17

    spi pic16f877a

    Hi,

    Well, how the SPI is configured depends on what its communicating with? Clock phase, frequency? And you can even change the idle state of the data line. Looking at examples won't really help, it'll get the SPI working, but might not be the cofiguration you need for your application. I say this over and over again, read the datasheet! all the info you need is in there. Microchip even provide a step by step guide to setting up peripherals:

    http://ww1.microchip.com/downloads/en/devicedoc/spi.pdf

    the datasheet: http://ww1.microchip.com/downloads/e...Doc/39582b.pdf

    Seriously, it5 isn't difficult to work out, thats why manufacturers provide datasheets, otherwise all enigineers would require 'training courses' to use these chips.

    Buriedcode



+ Post New Thread
Please login