Hi Karan [...] > i have been trying to simulate the I2C STOP condn. > for the slave. > so upon pressing button2 on the master, > the clk and the data lines go high. > this is the webpage im using as i2c reference: > http://perso.club-internet.fr/mbouget/i2c-faq.html > specifically: > http://perso.club-internet.fr/mbouget/i2c-faq.html#IC_017
This says: "The SDA and SCL lines can only be PULLED low. They cannot be DRIVEN high. To make them high the device just releases the line. " In: inline void clkhigh() { P2OUT |= CLKBIT; writedigit(2, '1'); } try P2DIR &= ~CLKBIT; In releaseDataHigh() similary. In slave TimerA interrupt try save initial value of P2IFG in variable and next test this, not P2IFG Albert