I2C Slave with a PIC


Closed Thread
Results 1 to 40 of 130

Hybrid View

  1. #1
    Join Date
    Jun 2011
    Location
    Philippines
    Posts
    223


    Did you find this post helpful? Yes | No

    Default Re: I2C Salve with a PIC

    @ DT, Thanks for the update..I will find time to play with it(I2C multiple slaves) this weekend(so many work, little time to play )

    Kind regards,
    tacbanon

  2. #2
    Join Date
    Nov 2008
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: I2C Salve with a PIC

    Hi all,
    for info to all: I have the code from Aretti here on a 18F25K22, works fine with one slave on one master. When i connect more slaves (up to 31) i get the effect that a NACK comes right behind the address, the SDA line is high during the 9th clock cycle... my bus is about 70cm long (long backplane) and i use a 3.3k on the i2c bus. It seems that this "NACK" effect is coming sporadic, does someone tried to do the same like me?
    Regards,
    Ralf

  3. #3
    Join Date
    Nov 2008
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Re: I2C Salve with a PIC

    Hi again,
    found the bug: the bus i am using is splitted in two 2 x 25cm long busses which is not the best solution. Sometimes because of layout reasons it must be done this way. In this case two 100 Ohm resistors close to the Master in series with SDA and SCL and pullup's 2 x 10kOhm at both ends of the splittet bus make the bus working fine. I checked the timing with a logic analyser and the quality of the signals with a scope, both ok, no glitches or other dirty effects. Hope this help others having same trouble. I must say best solution is always making the bus from one end to the other end in one direction, i tested this also with 80cm. Adding also two 100 Ohm resitors in series with SDA and SCL close to the master makes the signal quality better also.
    Both versions run with 80kHz very fine now.
    Regards,
    Ralf

Similar Threads

  1. Problem with PICto PIC I2C MASTER-SLAVE
    By juanen19 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th June 2013, 02:58
  2. PIC as I2C Slave
    By Mainul in forum General
    Replies: 4
    Last Post: - 5th January 2013, 13:23
  3. I2C Slave, config Vref - + in pic with ADC
    By sebapostigo in forum PBP Wish List
    Replies: 4
    Last Post: - 5th March 2007, 03:21
  4. Pic as an i2c slave
    By Robert Soubie in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th January 2007, 21:11
  5. Use pic as slave in I2C
    By robert0 in forum General
    Replies: 2
    Last Post: - 3rd February 2006, 19:26

Members who have read this thread : 2

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