I am having a problem where i have several devices on the I2C bus... While talking to one device ... it occaionally hangs up... the CLK on the I2C will remain high and the DATA will be pulled low.. by removing the power to the particular device, the Data line will jump back up and the I2C bus will work again.
Has anyone ever seen this problem... when this happens in Debug I cant find if it happens on a read or write...
Any pointers greatly appreciated
I2C Bus Problem
i have 7-8 devices on the bus right now. I do have pull-ups on the lines 4.7K. Signals look pretty clean.
I am using a PIC micro.. MPLAB C18. philba when you say keeping a log of the commands.. do you mean checking the watch window with breakpoints or is there a way to make an actual "log" wtih MPLAB?
Yeah, i check the slaves over and over again and it looks like they are ok too.
My PIC acts as a master the entire time..
My problem lies "i think" with this part
http://www.linear.com/pc/downloadDocume ... 1768,D2543
He is a 10 bit DAC. That takes address->command-> LSB->MSB.
I have a way of removing a connector that will remove power to this devices.. doing so will regain access to the bus.
I did however find a temp fix to this problem.. I found out that each I2C device acts like a State Machine... so by toggleing the clk of the bus I can step thru the "hold" caused by the 10 bit DAC.
Not the fix i was looking for.. but will work for now.
It is odd that it works most of the time.
This is my first time using a pic and working on a I2Cbus. The code that I am using is mine... I might have a ACK problem but it looks like my flags are being set correctly
I will be working on this for a week or so.. any ideas or pointers are greatly appreciated.
I am using a PIC micro.. MPLAB C18. philba when you say keeping a log of the commands.. do you mean checking the watch window with breakpoints or is there a way to make an actual "log" wtih MPLAB?
Yeah, i check the slaves over and over again and it looks like they are ok too.
My PIC acts as a master the entire time..
My problem lies "i think" with this part
http://www.linear.com/pc/downloadDocume ... 1768,D2543
He is a 10 bit DAC. That takes address->command-> LSB->MSB.
I have a way of removing a connector that will remove power to this devices.. doing so will regain access to the bus.
I did however find a temp fix to this problem.. I found out that each I2C device acts like a State Machine... so by toggleing the clk of the bus I can step thru the "hold" caused by the 10 bit DAC.
Not the fix i was looking for.. but will work for now.
It is odd that it works most of the time.
This is my first time using a pic and working on a I2Cbus. The code that I am using is mine... I might have a ACK problem but it looks like my flags are being set correctly
I will be working on this for a week or so.. any ideas or pointers are greatly appreciated.
Who is online
Users browsing this forum: No registered users and 30 guests