I used those app notes and the relevant datasheets for the micro and I2C device to create my own C code to run I2C devices like the DS1307, it's not particularly difficult. As Olin is famous for saying, it's all in the datasheets. I'd recommend getting a copy of the Phillips/NXP I2C documents as a guide to the protocol too. On Tue, 29 Oct 2019, 09:55 Alan Pearce - UKRI STFC, < alan.b.pearce@stfc.ac.uk> wrote: > > Have you considered just throwing away the driver and manipulating the > i2c peripheral directly? > > > > The datasheet typically has enough data for one with modest coding skil= ls > > to write a serviceable chunk of code. I've learned over the years tha= t > > often for comms and i/o it is better to just ignore the drivers and go > after the device directly, > > as the driver often makes assumptions which are not relevant to your > specific situation. > > Check out AN734 (Slave mode) and AN735 (Master mode) application notes > from Microchip. I used these successfully with PIC16F876 devices to make = an > I2C system. They are in assembly, and IIRC the AN735 code has a bug, but = I > have the details if you wish to use it. The code as listed is downloadabl= e > with the app note. > > I successfully modified them to use interrupts, using an early version of > Olins template system, and could find the code for you if needed. > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .