Hi James - Did you check the Errata documents? There are a number of issues with master mode I2C documented there for this chip (to the extent of " Master mode not functional" on original silicon) One of these may affect the driver you are using... Stephen On Wed, Oct 30, 2019 at 8:14 PM James Burkart wrote: > I've got the protocol down pretty solid. It's making the hardware work on > the micro side. I am definitely employing the datasheet of the 18F27K40. > -- > Sincerely, > > James Burkart > *925.667.7175* > > > On Wed, Oct 30, 2019 at 2:11 AM Clint Jay wrote: > > > I used those app notes and the relevant datasheets for the micro and I2= C > > 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 gui= de > > 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 > > skills > > > > to write a serviceable chunk of code. I've learned over the years > > that > > > > 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 yo= ur > > > specific situation. > > > > > > Check out AN734 (Slave mode) and AN735 (Master mode) application note= s > > > 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 > > downloadable > > > with the app note. > > > > > > I successfully modified them to use interrupts, using an early versio= n > 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 > > > > > -- > > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > -- > 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 .