Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/25/09 16:44
Read: times


 
#163853 - Simulating i2c in Keil uVision
I was attempting to simulate a P89LPC932 writing to a I2C chip e.g. a DS1307

The Slave_W address is 0xD0 and Slave_R is 0xD1, so I enter 0x68 in the SLAVE box.

I can set the STA bit in I2CON, and I would assume that the next cycle would set the SI bit and vector to the I2C interrupt ISR.

I seem to have to manually set the SI bit to trigger the IRQ.
The next state is to write the Slave address in the I2DAT register and await the interrupt.

However I always get a SLA_NACK response from the simulated Slave. Surely the Simulator should accept a 0xD0 or 0xD1 and give an SLA_ACK response.

Has anyone any experience of I2C simulation ?

David.

No replies in thread

Back to Subject List