SPI Communication between two pic 16f877


Closed Thread
Results 1 to 2 of 2
  1. #1
    anti83's Avatar
    anti83 Guest

    Default SPI Communication between two pic 16f877

    Hi, I'm new in the programming of the pic.
    I am I try to make to communicate two pic trammite SPI, I have modified the examples found on the site with l' shipment of a variable byte from the pic Slavic to the pic master. I do not succeed to understand because does not work… someone can help me?
    Thanks to all and sorry for my bad english
    Luca
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Hi Luca,

    I haven't looked at the rest of it, but both programs are missing the bottom of the Main loop.
    Code:
    MAIN:
    HIGH LED2
    IF PORTB.0 = 0 THEN MAIN
    B0 = 1
    LOW LED2
    GOSUB GETDATA
    GOTO MAIN
    
    GETDATA:
    SSPBUF = "?"
    GOSUB LETCLEAR
    if SSPBUF<>"!" THEN GETDATA
    SSPBUF = 0
    DT

Similar Threads

  1. 16-bit SPI problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th June 2008, 15:42
  2. SPI configuration PIC versus Atmel
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th July 2007, 19:17
  3. serial communication between CMUcam and PIC 16F877
    By gengkeys in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th March 2007, 06:43
  4. SPI PIC to PIC Bi-Directional Communication
    By CocaColaKid in forum Serial
    Replies: 5
    Last Post: - 23rd December 2006, 22:44
  5. Pic to Pic communication?
    By Rob Martin in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th April 2004, 19:41

Members who have read this thread : 1

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