On 1/14/07, Philip Pemberton wrote: > Mark Rages wrote: > > I had to make the some changes to use AN734 (I2C slave example) on a > > 16F690. For more information, including an idea for testing I2C, see > > my blog. (http://vivara.net/blog/?p=53) > > If you want to know why the address is 'halved', it's probably because I2C's > address field is 7 bits with a 1-bit read/write flag bit in the LSB. SMBus > takes the address as those seven bits, LSB-aligned, with separate R/W > operations on the SMBus controller. > > The PIC is comparing the address with 0x06 (write to real address 0x03), your > PC is writing to what it calls address 0x03. So the R/!W bit is low (write), > meaning the address byte has a value of... 0x06. > > I'm not 100% sure if this is what's actually happening, but the theory seems > to be accurate... YMMV. I suspected something like that, but I didn't dig through the specs to verify it. Oh here it is, in the '690 datasheet, section 13.12.1: > The value of register SSPSR<7:1> is compared to the value of the SSPADD register. Regards, Mark markrages@gmail -- You think that it is a secret, but it never has been one. - fortune cookie -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist