I tried to use hardware TWI of the ATmega328 on simulide 0.5.15, but it seems that the output on pin level is not completely correct.
The resulting signals are shown in the following image (SCL in brightblue on top, SDA in yellow on bottom). The SCL seems a bit delayed and the start condition of TWI is not correctly set before the the first rising edge.
I used the internal TWI registers without the TWI interrupt, only with polling, as shown in the 328 datasheet.
The resulting signals are shown in the following image (SCL in brightblue on top, SDA in yellow on bottom). The SCL seems a bit delayed and the start condition of TWI is not correctly set before the the first rising edge.
I used the internal TWI registers without the TWI interrupt, only with polling, as shown in the 328 datasheet.