+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Newbie level 2
    Points: 319, Level: 3

    Join Date
    Mar 2011
    Posts
    2
    Helped
    0 / 0
    Points
    319
    Level
    3

    I2C - No Master and Slave Communication Debugging Master in MPLAB

    Hello all,

    I am using two PIC 16F877A and I2C code from Microchip AN734 and AN735 for Master and Slave. There is communication between Master and Slave when debugging the Slave in MPLAB, but not when Debugging from the Master. When I use MPLAB Debugger on the Master firmware, the Debugger steps or runs through the code, it gets as far as sending the first Write command to the Slave, then the Master goes into endless main loop and does nothing more. I assume it is waiting for an I2C event interrupt from the Slave, but no interrupts occur. There is no response at all from the Slave and no further output from the Master.

    Yet when the same code is executed within MPLAB Debugger from the Slave side, the two communicate correctly. Also when the Slave and Master run in Programmed mode, again they communicate correctly. The problem only exists when trying to Debug the Master in MPLAB (which I need to do), the communication between Slave and Master doesn't work.

    Anyone have suggestions on the cause of this problem and what I need do to get this working?

    Thanks.

    Greg

    •   AltAdvertisement

        
       

  2. #2
    Member level 2
    Points: 2,264, Level: 11
    Achievements:
    7 years registered

    Join Date
    Jul 2008
    Posts
    53
    Helped
    8 / 8
    Points
    2,264
    Level
    11

    Re: I2C - No Master and Slave Communication Debugging Master in MPLAB

    maybe the master is waiting for the ack bit from the slave .:?



--[[ ]]--