Problem with PICto PIC I2C MASTER-SLAVE


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2012
    Posts
    6

    Default Problem with PICto PIC I2C MASTER-SLAVE

    hello, I have a problem with connection I2C with 2 PICs

    I have a PIC16F1933 (Slave) connected to PIC18F2685 (Master) by I2C connection.

    My problem is:

    SLAVE PIC send to Master value b00001010, master PIC receives this value, all correct, immediately after SLAVE PIC send to Master PIC the value b00001010 and PIC master receives b00000101 (INCORRECT VALUE), immediately after SLAVE PIC send to Master the value b00001010 and PIC master receives b00001010 (CORRECT VALUE), there is a shift and lose the first bit. I have in Master PIC connected a LCD, I see in DEC format: 10,5,10,5,10,5,10.... not 10 constant value because SLAVE PIC send the same constant value b00001010. I have 4k7 resistor in SDA and SCL lines and PIC master working correctly with others SLAVE devices in Read/Write (DS1307) in the program code, my problem is communication with this 2 PICs.

    suggestions, help?

  2. #2
    Join Date
    Nov 2012
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: Problem with PICto PIC I2C MASTER-SLAVE

    Problem solved, thanks

  3. #3
    Join Date
    Apr 2013
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: Problem with PICto PIC I2C MASTER-SLAVE

    Hi juanen19

    I have the same problem with u so i can get into this forum.
    But my problem is little bit different, i use pic16F877A to communicate each other as master-slave.
    I didn't know how pic as a slave.
    And actually i'm new with this PIC and I2C. I have read information about I2C but it's not clear enough for me.
    Could you please explain me about I2C in PIC16F877A as master and as a slave?
    or would you please show your code, may be i can learn from your code.

    Thank You so much.

Similar Threads

  1. Master to slave 16F767
    By sachymo in forum General
    Replies: 6
    Last Post: - 3rd June 2008, 20:22
  2. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  3. PIC master slave howto
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 18th September 2007, 22:35
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. i2c master/slave
    By lab310 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th April 2005, 22:23

Members who have read this thread : 3

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