Ok, ok! You found me out! It isn't really a "collision detection" technique as much as it is a "collision avoidance" technique... The unit that is about to talk tests the collision input to see if there is any traffic currently on the bus. If not, it waits a small about of time and tests again. The actual amount of testing required if up to the user. When a sufficent number of tests indicate that there is n traffic then the unit begins talking. This method has worked well in systems that had 128 units on one bus; should work for many more. Douglas Wood Software Engineer dbwood@kc.rr.com Home of the EPICIS Development System for the PIC and SX http://epicis.piclist.com ----- Original Message ----- From: "Ruben Jvnsson" To: Sent: Sunday, August 18, 2002 3:43 PM Subject: Re: [PIC]: CAN or RS-485 ? The problem with anti collision detection is that it is the node that is talking that also checks for collision (by listening and comparing the transmitted data with the received data) and that a '1' is equally strong as a '0' on the bus. This could mean that two nodes far enough apart from each other could both be talking and still not see the collision with the other since they are so far apart that the other transmitter isn't strong enough to affect the looped back data to the receiver in the same chip, especially if there exists some extra protection components (resistors and or inductors) in series with the driver input/output. This is why it is hard to make a network with nodes that is spontaneously transmitting as opposed to polled by a master with RS485. CAN on the other hand, is designed just for this. > Because RS-485 is an electrical specification and not a hardware or > protocol specification, as such, it does not describe any method for > collision detection. However, for this circuit I have added it. > > Also, I've included an "anti-chatter" circuit (basically a charge > pump) to the "talk enable"; in the event that the PIC goes south while > talking to the bus, the device can not tie up the bus (note: the > interface circuit does not require the use of the anti-chatter > circuit). > Clever, I will have that in mind for my next RS485 network. Ruben ============================== Ruben Jvnsson AB Liros Elektronik Box 9124, 200 39 Malmv, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se ============================== -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body