Adding a pic in I2C network....

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005

    Default Adding a pic in I2C network....


    In a given environment i'm using a Pic16f876 and a I2C connection to read a memory and driving a Pcf8574 with 8 leds.
    Now i have to add a new pic (pic16f84) and it seems to me the more logic solution to connect it in the i2c network.This new pic must continuosly read RF incoming data and send them to the "old" pic creating an interrupt.

    Well, never found a real example on how I2cWrite and I2cRead work between pics.Could you point me????What is the "control" ,i mean the address, on a pic?

  2. #2
    Join Date
    Oct 2004
    Hangover, Germany



    your 16F876 ist the master,
    the Pcf8574 seems to be the slave.

    So your 16F84 is another slave !!!!!
    Your master has to poll the new slave !!!! No Interrupt !!!!

  3. #3
    Join Date
    Apr 2005


    Thanks for your help.

    Polling continuosly isn't the best (i think) but which serin and serout command?I mean how can both recognize each other?
    pcf8574 has a built in address(btw is 01110000) but how about the pics?

  4. #4
    Join Date
    Jul 2003


    PICs can only act as MASTER using PICBASICs IC2READ and I2CWRITE commands.

    If you want to use a PIC as a SLAVE, then you need to write your own routines to do that. You can then assign whatever address you want to your SLAVE PIC - they don't come with a pre-assigned I2CSLAVE address because they don't come with integral I2CSLAVE software. It's up to YOU to create that software.

    I would refer you to Microchip Application Note AN734...

    But don't blindly copy it without understanding... there's some serious errors and omissions (as most Microchip Application Notes seem to have) that will prevent the code from operating correctly. However the theory is reasonably all in place.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 20:33
  4. Use pic as slave in I2C
    By robert0 in forum General
    Replies: 2
    Last Post: - 3rd February 2006, 20:26
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 14: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