Hi all, I want to learn 'how to program an I2C device' . I am trying to find a simulator for an I2C device which I can use to test any sample programs I get from the web. When I search the web for a simulator I get a lot of VLSI related results. Is there a free I2C device simulator software for learning I2C programming. Thank in advance.
I don't know, if there is a simulator, but the best would be to use a microcontroller and a real I2C device anyway. The protocol is easy and many microcontrollers have master and slave support, so you could even use 2 microcontrollers and test master/slave communication, but a real slave device, like the PCA9555, would be better, because then you can be sure that the slave protocol is implemented right.
The interesting part for I2C is when the chips are stuck, e.g. some chip is holding SDA low all the time, because of a bad I2C implementation or EMC problems. This problem is so common that there are even chips which can detect a stuck I2C bus and which tries to recover it by hammering some pulses on SCL:
This can be done in software on a microcontroller, too.
Frank Buss, email@example.com