| ??? 10/17/08 17:16 Read: times |
#159161 - Because... Responding to: ???'s previous message |
Hi Andy,
I saw STA=1; inside i2c_transmit() function. I want only to see the interrupt workes. And I wish see the interrupt workes in the LPC. But i'm frustrated. Neither this simple code is working in LPC, but it workes in the simulator. Ok, I removed STA and STO from my code and tried again. It doesn't work too. What's my problem ? void main(void)
{
P1M1 &= 0xEF;
P1M1 |= 0x20;
P1M2 &= 0xDF;
P1M2 |= 0x10;
P1 |= 0x10;
i2c_init(0x00, 0);
EA=1;
while(1)
{
i2c_transmit(M24C01); // send peripherical address
while(STA);// wait trans.to be completed (device address)
}
}
|



