i2c quadrature encoder implementation for Attiny