Use pic as slave in I2C


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    23

    Default Use pic as slave in I2C

    Hello,

    is it possible to store data in a Pic eeprom to be read from another Pic?

    I'd like to have a pic as a slave in a I2C network and another one as a master reading and possibly writing onto pic slave memory.

    I have few data to be shared between the pics.
    Thanks.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You asked a variation of this question before - back in May 2005. The answer is still the same as then... PICBasic does not support I2CSlave mode. You have to create your own routines to do that.

  3. #3
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109


    Did you find this post helpful? Yes | No

    Default

    There is an example of doing I2C Slave in PBP in the examples on MELABS website here http://www.picbasic.com/resources/samples.htm, just download the I2CSLAVE.BAS and I2CMAST.BAS and try them out. These samples are for the 16F877A but with some modification they do work on the 18F452 and serveral other PIC MCUs.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 23:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  3. Another I2C Slave Routine Problem
    By DanPBP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 06:50
  4. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 20:33
  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 : 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