stdnt
Joined: 26 Jun 2006 Posts: 1
|
i2c multi master problem |
Posted: Mon Jun 26, 2006 1:05 pm |
|
|
Hello,
I'm writing a code in PIC18F452 using ccs compiler version 3.236 - I'm trying to create a small network with three devices.
In IDLE state all of the micro's are configured on a slve mode, and when one wants to transmit a message it become a mater - send the information - and return to slave mode immediately.
My problem occures when there is a collision on the i2c bus. meaning, one micro is in the middle of transmit process and other micro tries to send data on the same time - BOTH of them get stuck....
I read that the i2c_start function should take care of situation like this, and waits (blocked function) until the bus is free, if it was the case my networks will work just fine - but as I wrote before it get stuck and only a reset will fix that (external reset, the reset_cpu() function doesn't help).
Another question is how do I get the specific address of special register, such as SSPCON1, I want to gain access to one bit there.
i'll appreciate any help
Thnx in advance. |
|