Rochester, 20 April 2006. First of all, if at all possible, avoid using the 16F84A. I believe the 16F88 has I2C built in (though using built-in I2C isn't necessarily simpler than bit-banging I2C, it certainly is faster once the program is done, as you can process other things while bytes are received/sent). However, if you do want to use it, I'm sure the piclist.com website contains various implementations of I2C. And if that is not enough, you could go to my website, http://jen.mosha.net/PIC/ which, under "Drake 2" as a link to base.asm. This base.asm contains all sorts of functions, some of which start with I2C or EROM. I know that this is for the 16F628A, but the 16F628A is very similar to the 16F84A, and porting the code should give no problems. A more recent version of these files is available on sourceforge as http://sourceforge.net/projects/drake-devkit which also contains the Drake 3 code, for the 16F877A, which shows how you can use the built in peripheral (though the 16F88 peripheral might not work the same as that of the 16F877A: I have the 16F88 but never tried to use the built-in I2C functonality). All these implementations are in absolute mode assembly, so you might want to make them relocatable. They do have a lot of comments. The routines support random write, random read and sequential read. If you also want sequential write, you might want to look at the Drake 4 project, which is for the 16F688. These are basically the same routines, but I made some minor modifications to allow sequential writes. Note that most memory chips don't allow sequential writes outside of a page (256-byte boundary). Another thing to be aware of is that the Drake 2/3 routines allow reading of the internal EEPROM using the same routines, you might want to delete this code (this internal EEPROM is referred to as IROM). Greetings, Maarten Hofman. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist