Yahoo Groups archive

Lpc2000

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

Thread

i2c stop bit

i2c stop bit

2004-10-27 by sifiland

Hello,
my program generate no STOP bit during the writing.  Can you help me 
there
further?  Enclosed you receive the files .

...
I2DAT    = Data; 
I2CONCLR = 0x0028;    // Clear i2c und STA interrupt bit 
while(I2STAT!=0x28&&!(I2CONSET&0x08));	//wait the ACK

I2CONSET_bit.STO = 1; 
//Here STOP bit is not generated

I2CONCLR_bit.SIC = 1;
while((I2CONSET & 0x10));

Re: i2c stop bit

2004-10-27 by zpierre007

Try this:

#define STA	0x20
#define SIC	0x08
#define SI	0x08
#define STO	0x10
#define STAC 0x20
#define AA	0x04


#define STOPI2C		I2C_I2CONCLR = SIC; I2C_I2CONSET=STO; while
((I2C_I2CONSET&STO));//Stop bus I2C


This code is comming the list folder, and in the sip file : I2C.zip
All function are running, because i used it to access on 3 differents 
devices.




--- In lpc2000@yahoogroups.com, "sifiland" <sifiland@y...> wrote:
> 
> Hello,
> my program generate no STOP bit during the writing.  Can you help 
me 
Show quoted textHide quoted text
> there
> further?  Enclosed you receive the files .
> 
> ...
> I2DAT    = Data; 
> I2CONCLR = 0x0028;    // Clear i2c und STA interrupt bit 
> while(I2STAT!=0x28&&!(I2CONSET&0x08));	//wait the ACK
> 
> I2CONSET_bit.STO = 1; 
> //Here STOP bit is not generated
> 
> I2CONCLR_bit.SIC = 1;
> while((I2CONSET & 0x10));

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.