USITWIX

USITWIX is a library that uses the built into ATtiny85/Tinusaur USI unit to implement Atmel TWI (Two Wire Interface) which is compatible with Philips I²C interface.

The primary source for this work is the Atmel application note AVR312: Using the USI module as a I2C slave that explains how to use the  built-in USI unit as I2C slave.

TWI Address and Data Packet Format
Diagram from AVR312: Using the USI module as a I2C slave

The source code is available at https://bitbucket.org/tinusaur/usitwix.

User the USITWIX Library

TBD

References

Here are some references to sources that were used while developing this library.

AVR312: Using the USI module as a I2C slave
http://www.atmel.com/Images/doc2560.pdf
C-code driver for TWI slave, with transmit and receive buffers; Compatible with I2C protocol; Interrupt driven, detection and transmission/reception; Wake up from all sleep mode, including Power Down.

TINY USI Interface in I2C mode and the AVR312 Appnote
http://www.aca-vogel.de/TINYUSII2C_AVR312/APN_TINYUSI_I2C.html
What’s wrong with the AVR Appnote?

ATTiny USI I2C Introduction – A powerful, fast, and convenient communication interface for your ATTiny projects!
http://www.instructables.com/id/ATTiny-USI-I2C-The-detailed-in-depth-and-infor/
I2C, it’s a standard that’s been around for around 20 years and has found uses in nearly every corner of the electronics universe. It’s an incredibly useful technology for us microcontroller hobbyists but can seem daunting for new users. This tutorial will solve that problem, first by reviewing what I2C is and how it works, then by going in-depth on how to implement I2C in Atmel’s ATTiny USI (Universal Serial Interface) hardware.

I2C Bus for ATtiny and ATmega
http://www.instructables.com/id/I2C_Bus_for_ATtiny_and_ATmega/
This two wire interface is formally known as the Inter-Integrated Circuit bus, or just the I2C bus and was invented by NXP when it was still Philips Semiconductors. If you’re reading this Instructable then you’ve probably heard of the I2C bus and may even have used it on a PIC or other microcontroller. While conceptually very simple, and supported by hardware resources on the AVRs, software drivers are still necessary to use the I2C bus. Atmel provides Application Notes (see the Resources later in this Instructable), but these are incomplete and don’t show any examples beyond communicating with another AVR device.

6 thoughts on “USITWIX”

  1. This project is a joke. tinusaur is dead. the originators said “open source”, and yet all of their code has been taken down off the bitbucket site. They still seem to have an active webpage to sell, but sadly no support.

    Reply
    • Dear Dave, before you judge us you should probably check the status of the bitbucket service to see that it is in fact not our fault that they decided to shut the source code repository down – not only for us but for hundred or thousand other users who use Mercurial for source control.

      We migrated some of our code already to https://gitlab.com/tinusaur

      And yes, we are open source.

      And yes, we sell stuff to keep this project going.

      Reply

Leave a Comment