Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I2C - No Master and Slave Communication Debugging Master in MPLAB

Status
Not open for further replies.

gw_deja2

Newbie level 2
Joined
Mar 24, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
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. 8-O

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

Thanks.

Greg
 

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

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top