I had similar problems running an IIC at 400KHz with a 20MHz PIC - previously it worked fine at 4MHz, and yes I did meet all the setup, hold and clock width times with the higher clock rate. Solution was to reduce the pullup resistors from 22K to 2K - this may solve your problem, the series resistor is probably delaying edges or stretching pulses! PS - I hate IIC - it can be really hard to make it work despite its huge flexibility ! Robin Abbott - robin.abbott@dial.pipex.com ************************************************************************** * * Forest Electronic Developments * http://dspace.dial.pipex.com/robin.abbott/FED * ************************************************************************** ----- Original Message ----- From: Henry Carl Ott To: Sent: 30 September 1999 19:21 Subject: Re: I2C Realtime Clock Problem > Menno, > > You may want to look at your I2C routines. Here is why. > > I was just finishing up some code on a pcf8583 and a 12c671 and I ran > into a weird problem. Everything worked fine at 5 volts but when the > circuit was switched to 3volt battery (the target voltage) I could no > longer read the pcf8583. A 24lc64 also on the I2C bus could be accessed > with no problem. > The PCF8583 was rated down to 2.5 volt, and I could not for the life of > me figure out what was going on. > Started looking at the I2C signal on the DSO and started seeing some > contention. There seems to be certain conditions on the I2C bus involving > the ACK phase where the PIC is driving the SDA line hi when the PCF8583 is > trying to drive it low. > > They were able to muscle it out at 5 volts, but at 3 volts there were > problems. All the problems went away when I put a series resister (~330ohm) > on the SDA line from the PIC. I also rewrote the I2C routines so that the > pic never drives the SDA line high, but tristates SDA and lets the pullup > pull the the line hi. I've not tested the circuit again to see if I can > take out that series resister. > > > Hope these tech ramblings were of some help. > > > At 09:49 PM 9/29/1999, you wrote: > >Hi everyone... > > > >I'm currently trying to get a PCF8583 realtime clock running and are having > >some difficulty. I use a PIC16C84 to emulate the I2C bus. There is nothing > >wrong with the I2C procedures since I also use them to access other I2C > >devices on the same bus. I want the clock to give me an interrupt every 6 > >minutes. It seems that whenever I read from the clock IC via I2C it doesn't > >accept any other commands. It just hangs!!!. Please, can you help me? Maybe > >there is something wrong with the datasheet and maybe I just missed > >something? > > > >Thanx for any help > > > >Menno J Houtman > > > carl > > -------------------------------------------------------- > Henry Carl Ott N2RVQ carlott@interport.net > http://www.interport.net/~carlott/ > -------------------------------------------------------- > You're entitled to your own opinions. > You are not entitled to your own facts.