hi im using LPC2148 hardware i2c while im writing i2c_write() routine im facing some strange problem im showing my code below
void i2c_write(unsigned int data) { I2C0DAT=data; while(!(I2C0CONSET & 0x08));// wait untill interrupt set // here i display the status im getting status code as 0XF //i.e display(I2C0STAT); }
if im write in this maner im getting status code
void i2c_write(unsigned int data) { I2C0DAT=data; while(!(I2C0CONSET & 0x08); display(I2C0STAT) // error code 0xF8; while(!(I2CCONSET & 0x08) display(I2C0STAT); //error code = 0x28; }
why this is happening please tell me any one