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 > 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));
Message
Re: i2c stop bit
2004-10-27 by zpierre007
Attachments
- No local attachments were found for this message.