> The i2c specification from Philips specifies that the two lines SCL and = > SDA be driven from open collector outputs. These outputs then need to = > have pullup resistors to +Vdd. In order to send a 1 on the bus the = > driver allows the data line to float high. To send a zero, the driver = > will drive the data line low. > > Since the PIC parts do not usually have open collector outputs, the only = > thing to do is to use the TRIS registers and change the direction of the = > port. If the proper pullups are installed on the bus lines, the result = > will be an i2c bus. A couple things to note here: [1] If the pullups on PORTB are enabled, you may not need external pullups (assuming you use PORTB for the I2C of course) [2] Most I2C memory devices never drive the clock wire themselves; if you will be using such devices in a single-master environment, it may be easier and faster to just set and clear the clock wire directly. This is especially true if you use RA4 for the data pin (you'll need a pull- up resistor if you do this, obviously).