I do not know which is the most suitable forum for this, it probably suits this, Electronics and Programming. I will start here.
I am currently using an ATTiny84 to generate DCC signals. Programming is with IDE and DrAzzy's ATTinyCore. The ATTiny84 is controlled using an Atmega328P (eventually PB). I communicate via I2C - ATTiny84 is slave. All of this works great.
I now have a need to connect an I2C slave device to the ATTiny84. That implies operating as both a slave and master. I do not think switching between slave and master will work in this case so I will probably have to use separate I2C buses.
That will not be possible with the ITTiny84 so I have been considering maybe an ATTiny1634 or an ATTiny1617/ATTiny3217.
The 1634 has a hardware slave I2C interface and a Universal Serial Interface (USI). I think the USI has to be used for master I2C. I am sure this is already correctly handled with ATTinyCore(?). The question is, can both be used simultaneously? If so, how are the additional SDA and SCL pins defined?
Alternatively, can the ATTiny3217/1617 (along with DrAzzy's megaTinyCore) be used? Specs in the datasheet says "-Master/slave I2C with dual address match" and in the Feature and Overview section it says:
Independent Master and Slave operation.
- Combined (same pins) or Dual mode (separate pins).
Does this imply two separate buses as master and slave is simultaneously possible? If so how do I implement the separate pins etc.
Any help or advise appreciated.
Willem.