Minimal I2C for the New AVR Microcontrollers
This article describes a set of minimal I2C routines for the new 0-series and 1-series ATtiny and ATmega microcontrollers. They allow any of these processors to act as an I2C Master and connect to I2C peripherals. As an example of their use I’ve designed a digital clock circuit based on a 0-series ATtiny402 connected to an I2C RTC module and driving an I2C 7-segment display.
The main difference between these routines and the standard Arduino Tiny Wire library is that these don’t use buffers, so have minimal memory requirements, and don’t impose a limit on transmissions.
Note that these routines are designed for the latest ATtiny 0-series and 1-series processors, and the 0-series ATmega chips; if you want minimal I2C routines for the earlier ATtiny processors, such as the ATtiny85, see my earlier article Minimal Tiny I2C Routines.
Minimal I2C for the New AVR Microcontrollers – [Link]