1 master 4 slave communication I2C protocol how to do?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Luna's Avatar
    Luna Guest

    Default 1 master 4 slave communication I2C protocol how to do?

    Hi , first of all I have to say that I start to work with pic programming 1 month ago so if my questions are too simple or stupid for you , please forgive me. I want to connect 5 pic together , 1 master and 4 slave. Slave pic receive data from sensors and when master ask they have to communicate value to it and receive order from master. I want to develop all with I2C communication protocol because every pic is few cm from other and I think it is simple to make without use of other component and using only 2 cable. I studied some example of communication between pic and device that communicate with I2C protocol. But I don’t understand how to differentiate one pic from an other , how to give an unique identification code. So when I m calling a pic the answer is only from the right pic. I don’t know if it is an hardware or software problem. I like if some one can help me to solve this problem and can show me so code example to make communication. After of all I want to know how is the right way to connect pic together. Thanks you in advance.

  2. #2
    giovanni's Avatar
    giovanni Guest


    Did you find this post helpful? Yes | No

    Question

    Hi Luna and hi to everybody
    I'm a newbie in programming pic and I'm in the same your situation...
    Can anyone help me and Luna with this problem?
    I'm using pascal language to program pic and I want to connect three pic; one of this is master and other two are slave...
    I think that after the addressing problem, the other part of program are quite simply because I can indicate the address of the interested pic in I2CREAD/I2CWRITE, isn't it?
    Thanks in advance...
    Giovanni.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I know it will not be a big help but, the Use of I2CREAD/I2CWRITE will be the one to use with the master. For all slaves, you'll have to build your own routines. HOW TO??? that's one of those apps to place on a board and play with. Tricky... a bit but not impossible.

    If some here are willing to share their routine, you have luck guys!!!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  4. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  5. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14:23

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