simavr icon indicating copy to clipboard operation
simavr copied to clipboard

I2c slave implementation

Open seplog opened this issue 3 years ago • 1 comments

Hello,

I have implemented a small example for a twi slave on an AVR device. While I implemented this, I have seen that there a some small bugs within the implementation of the sim_twi.

I think the first was, that the interrupt Flag is cleared while writing a 1 TWIINT register. The second was some invalid states of the TWI.

I think I have corrected these and attach a very simple implementation of the avr twi slave.

Best regards and many thanks for that great simulator! seplog

seplog avatar Jun 30 '21 20:06 seplog

This needed some small changes when merging: the include paths in parts/i2c_master.[ch] point to an installed version (that I do not have) rather than the build tree and after PR #440 was merged, the firmware struct in i2ctest.c must be initialised. I also tidied some spelling and syntax in the README. My version is here.

gatk555 avatar May 25 '22 15:05 gatk555