Thanks for the replies, and that's Olin too. I should have known to work=20 backwards and figure out the formula. The 13h looks like it fits the=20 pattern. Must just be me or something. I had no problems figuring out=20 the RS-232 serial port bit, and the give a formula there, maybe should=20 have looked there for a hint. Thanks again. :) On 2/20/2011 2:30 PM, Oli Glaser wrote: > On 20/02/2011 18:34, Carl Denk wrote: > =20 >> I have an 18F4320 with 8mz crystal and a DS1307 RTC, and trying to set >> up the Library I2C (Not software) to drive the DS1307. In the 18F4320 >> Data sheet, Table 17-3 (I2C Clock with W/BRG) There are FOSC values of >> 40, 16, 10, and 4 mhz., but not 8 mhz. that I have. What value should I >> use for SSPADD? I am following the example here: >> http://www.microchip.com/forums/tm.aspx?m=3D515040&high=3DI2C+DS1307. >> >> Any other thoughts appreciated too. :) >> =20 > Looking at the tables and comparing the values, it looks like the > formula is Fcy / (BRG + 1) > So for 100 kHz @ Fosc 8MHz it would be 2MHz / (19 + 1) =3D 100 kHz. (19 i= s > in decimal =3D 0x13 for hex) > (Fcy is instruction cycles =3D Fosc / 4) > > =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .