Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

I2C problem

2005-06-12 by Boris Kralik

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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.