{"id":27293315,"url":"https://github.com/puuu/usiwire","last_synced_at":"2025-04-11T22:43:42.547Z","repository":{"id":52272833,"uuid":"86125775","full_name":"puuu/USIWire","owner":"puuu","description":"USI based TWI/I2C library for Arduino","archived":false,"fork":false,"pushed_at":"2020-07-18T12:33:52.000Z","size":74,"stargazers_count":61,"open_issues_count":6,"forks_count":18,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-11T22:43:38.795Z","etag":null,"topics":["arduino","attiny","i2c","usi"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puuu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-25T02:10:58.000Z","updated_at":"2025-01-24T03:05:46.000Z","dependencies_parsed_at":"2022-09-09T06:01:52.743Z","dependency_job_id":null,"html_url":"https://github.com/puuu/USIWire","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puuu%2FUSIWire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puuu%2FUSIWire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puuu%2FUSIWire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puuu%2FUSIWire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puuu","download_url":"https://codeload.github.com/puuu/USIWire/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492983,"owners_count":21113159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","attiny","i2c","usi"],"created_at":"2025-04-11T22:43:42.059Z","updated_at":"2025-04-11T22:43:42.532Z","avatar_url":"https://github.com/puuu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/puuu/USIWire.svg?branch=master)](https://travis-ci.org/puuu/USIWire)\n\n# USIWire\n\n[Arduino Wire](https://www.arduino.cc/en/Reference/Wire) compatible\nlibrary, supporting I²C, I2C, IIC and/or (Two Wire Interface) TWI for\nAtmel ATTiny microprocessors utilizing the Universal Serial Interface\n(USI).  This library proviedes Master and Slave functionality.\n\n\n## Installation\n\nThis library can easily be installed via\n[Arduino Library Manager](https://www.arduino.cc/en/guide/libraries).\n\n\n## Usage and Support\n\nPlease have a look to the\noriginal\n[Arduino Wire Library](https://www.arduino.cc/en/Reference/Wire). Just\ninclude the library in your sketch:\n\n```c++\n#include \u003cUSIWire.h\u003e\n```\n\nThis library is tested to compile against:\n- ATTiny24/ATTiny44/ATTiny84\n- ATTiny25/ATTiny45/ATTiny85\n- ATTiny261/ATTiny461/ATTiny861\n- ATTiny87/ATTiny167\n- ATTiny2313/ATTiny4313\n- ATTiny1634\n\nATTiny support for Arduino is provided\nby [ATTiny Core](https://github.com/SpenceKonde/ATTinyCore).\n\n\n## Features\n\n- Provide I2C/TWI for ATTiny platforms with USI support.\n- Support for slave and master mode.\n- Full callback support in slave mode including proper stop condition\n  detection in the interrupt routine.\n- Low usage of dynamic memory. Only 46 bytes including buffer.\n- Use of one common 32 byte buffer for master and slave.\n- Compatibility\n  to [Arduino Wire Library](https://www.arduino.cc/en/Reference/Wire)\n  1.0 and later.\n- Start from scratch with ATMEL \"AVR312 USI as I2C slave\" and \"AVR310\n  USI as I2C master\" examples.  All changes were done via version\n  control.\n- Support\n  the\n  [Arduino Library Manager](https://www.arduino.cc/en/guide/libraries)\n  for installation.\n- Test suites for master and slave mode that run with USIWire and\n  Arduino Wire to validate, e.g., System Management Bus (SMBus)\n  communication, proper detection of start and stop condition\n  detection, wake up from sleep modes.\n\n\n\n\n## Differences to Arduino Wire Library\n\nTo reduce the memory footprint of this library, a common buffer of 32\nbyte for slave and master mode is used.  This require some care in the\nsketches:\n\n- Remove of inheritance of Stream (saves 20 bytes of dynamic\n  memory).  Thought, all important `write()` functions are supported.\n- One common buffer for slave and master mode: This do not allow, to\n  operate simultaneously in master and slave mode.  Thought, switching\n  between master and slave mode is possible with `end()` and\n  `begin()`.\n- Only one buffer for rx and tx operations in master mode: `read()`\n  can not be used in between of `beginTransmission()` and\n  `endTransmission()`.\n- In slave mode, the common buffer is split into rx and tx buffer.\n- After calling the onReceive callback, the slave rx buffer is\n  cleared.\n\n\n## Contributing\n\nContributions are welcome! If you find an bug, feel free to open an\nissue at GitHub or even a pull requests ;-).\n\n\n## Acknowledgement\n\n- Arduino team for\n  the [Arduino Wire Library](https://www.arduino.cc/en/Reference/Wire)\n- Authors and contributor of TinyWireS and TinyWireM for some\n  inspirations.\n\n\n## Links\n\n- [TinyWireS](https://github.com/rambo/TinyWire/tree/master/TinyWireS):\n  Another USI I2C implementation, slave only\n- [TinyWireM](https://github.com/adafruit/TinyWireM): Another USI I2C\n  implementation, master only\n- [AVR312: Using the USI Module as a I2C Slave, Application Note](http://www.atmel.com/ru/ru/Images/Atmel-2560-Using-the-USI-Module-as-a-I2C-Slave_ApplicationNote_AVR312.pdf)\n- [AVR310: Using the USI module as a TWI Master, Application Note](http://www.atmel.com/images/atmel-2561-using-the-usi-module-as-a-i2c-master_ap-note_avr310.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuuu%2Fusiwire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuuu%2Fusiwire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuuu%2Fusiwire/lists"}