I2c problem in lpc2124
I am trying to interface a DS1307 RTC to LPC2124.
The pclk is 60MHZ with VPIB divider being 1.
This is how i initialised the I2C
unsigned int i;
// setup SCL pin P02
PINSEL0 &= ~(3<<4);
PINSEL0 |= 1<<4;
// setup SDA pin P03
PINSEL0 &= ~(3<<6);
PINSEL0 |= 1<<6;
// set default bitrate of 100KHz
I2SCLL = 400;
I2SCLH = 400;
// disable and reset interface
I2CONCLR = 0xFF;
// enable interface
I2CONSET |= 1< }
Now problem is after i send start the i2cstat is not giving 08h
value.It just hangs means the I2CSTAT remains 0xF8.All physical
connections are proper which i checked.Can somebody help me to debug this.