I2C problem

Started by Boris Kralik June 12, 2005
Hi guys.
I have problem with I2C on LPC2294;
I set SDA and SCL wires as I2C:
PCB_PINSEL0 |= 0x50; //Set SCL and SDA
PCB_PINSEL0 &= (uint32_t)0xFFFFFF5F;
and next configure I2C
I2C_I2SCLL = 60;
I2C_I2SCLH = 70;
I2C_I2CONSET = 0x40;// (1 << I2C_FLAG_I2EN);Enable I2C state after reset
SDA is H, SCL is H <- OK

problem:
when I send start bit
I2C_I2CONSET |= (1 << 5);
SDA go L (it is good), but SCL go L too <- it is wrong, isn't it ?

I think, SDA state must go to L and SCL continue in H state while I
start sending data or address. isn't it ? : IT IS MY QUESTIONS

This code is simply, where may be problem ?
Thank your for any ideas.

btw:I uses GNU compiler.
when I off I2C bus by code:
I2C_I2CONCLR |= I2C_FLAG_I2EN; //I2C off
both signals goes to H : it is OK
when I send stop bit by code
both signals goes to H : it is OK



An Engineer's Guide to the LPC2100 Series