David BALDWIN wrote: > Hello everybody! I have an EXPRESSSSSSSSS request: I need all the code > you have (if possible of course...) to drive I2C devices. I have to > make communications between PICs and between PICS and sensors. I think > it is the best protocol. The distance is about 60m in noisy > environment. Any help is apreciated. Thanks a lot. (Recommendations in replies to use RS-485 noted.) Well, the manufacturers of the sensors seem to be encouraging this use in some ways, particularly when they stress the virtues of paralleling sensors. I am looking at a protocol for paralleling "command pads" which will serve as light switches in my house. What I have fitted is cable which is AFAIK, fire alarm cable; not fireproof (that solid copper co-ax with asbestos or ceramic bead insulation) but foil shielded twin of about 1/8" or 1/10" overall diameter with Teflon insulation. I also want to include the power feed, ("parasitic" feed must be considered) so am presently planning on a single wire O/C serial bus, possibly with contention resolution like Microwire, but may have to be slower due to cable capacitance. The shielded cable should take care of noise. Most "pads" will be proximity-sensing using a capacitance- measurement algorithm and of course, will be implemented in PICs (16C71). Since I2C devices have no lower limit on clock speed, it should nevertheless be possible to use them on longer lines if similarly shielded. The design of line "repeaters" for long lines is an interesting exercise. Cheers, Paul B.