PIC to PIC communications


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Nov 2004
    Location
    Calabasas, CA
    Posts
    84

    Default PIC to PIC communications

    I cannot transfer a variable from one PIC to another as:
    master: SEROUT B.7,N2400,[w2]
    slave: SERIN B.0,N2400,[w2]
    It appears that the slave does not wait for any serin (the pic's run in 2 different programs/circuits). How to implement a "wait til receive a serial connection"?

    Would it be something like:
    SERIN B.0,N2400,100,[w2]
    to wait for 100ms?
    Last edited by droptail; - 8th March 2006 at 02:19.
    James

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Which PIC are you using ?

    Hi,

    Why not use the serin2 / serout2 with flow control. That should solve your problem. If you are using the Hardware USART then interrupt in another option.

    Regards

    Sougata

  3. #3
    Join Date
    Nov 2004
    Location
    Calabasas, CA
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Using (2) PIC16C716's simply w2=100
    I was under the impression that the slave would wait (forever in above example) until data (w2) is recieved?
    I found this in some thread:
    master:
    SEROUT2 PortB.7,N2400,100,Main,[Wait "A",w2]
    slave:
    SERIN2 PortB.0,N2400,100,Main,[Wait "A",w2]

    Does this wait 100ms and if no transfer go to Main subr?
    Will this transfer var contents of w2? There is something about Wait "A" I've seen. Can you give example?
    James

Similar Threads

  1. Replies: 24
    Last Post: - 2nd October 2017, 11:35
  2. PIC Basic Pro <-> HP-IL communications
    By swr999 in forum Serial
    Replies: 0
    Last Post: - 6th March 2006, 18:30
  3. PIC Basic Pro <-> HP-IL communications
    By swr999 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th March 2006, 18:22
  4. PIC to PIC communications
    By droptail in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th January 2006, 04:46
  5. PC / PIC communications?
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th September 2005, 17:55

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