All Projects → puuu → USIWire

puuu / USIWire

Licence: LGPL-3.0 License
USI based TWI/I2C library for Arduino

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to USIWire

tinnymodbus
RS485 ModBus tiny multi-sensor module
Stars: ✭ 75 (+59.57%)
Mutual labels:  attiny, i2c
pigpio-client
A nodejs client for pigpio socket interface.
Stars: ✭ 24 (-48.94%)
Mutual labels:  i2c
SwiftySHT20
⚡ A Swift library for the I2C SHT20 Humidity and Temperature Sensor.
Stars: ✭ 19 (-59.57%)
Mutual labels:  i2c
NR1-UI
Userinterface for Volumio (RaspberryPi) with ssd1322 and ssd1306 oled display, spectrum bargraph, progress bar, LED functions, Standby-functions, 4 Buttons and Rotary Encoder.
Stars: ✭ 29 (-38.3%)
Mutual labels:  i2c
ATtiny13-TinySolder
T12 Quick Heating Soldering Station
Stars: ✭ 45 (-4.26%)
Mutual labels:  attiny
shogi-player
将棋の棋譜を再生したり盤面を編集したりします
Stars: ✭ 42 (-10.64%)
Mutual labels:  usi
embedded-sps
Embedded i2c Driver for Sensirion Particulate Matter Sensors - Download the Zip Package from the Release Page
Stars: ✭ 36 (-23.4%)
Mutual labels:  i2c
sonicdisc
A 360° ultrasonic scanner
Stars: ✭ 35 (-25.53%)
Mutual labels:  i2c
mpy-lib
HTS221, LPS22, LIS2DW12, LIS2MDL, LSM6DSO, STTS751, bme280, bmp280, APDS9930, TM1650, TM1637, LCD1602, all kinds of micropython drives, examples, libs
Stars: ✭ 118 (+151.06%)
Mutual labels:  i2c
pico i2c slave
I2C slave library for the Raspberry Pi Pico
Stars: ✭ 39 (-17.02%)
Mutual labels:  i2c
PCF8575 library
Library to use i2c digital expander with arduino, esp8266 and esp32. Can read write digital value with only 2 wire (perfect for ESP-01).
Stars: ✭ 28 (-40.43%)
Mutual labels:  i2c
MCP7940
Arduino Library to access the MCP7940M, MCP7940N and MCP7940x Real-Time chips
Stars: ✭ 29 (-38.3%)
Mutual labels:  i2c
MPU60X0
Fast, Lightweight STM32 I2C HAL Driver for the MPU6000/MPU6050 IMU
Stars: ✭ 15 (-68.09%)
Mutual labels:  i2c
embedded-ccs811-rs
Platform agnostic Rust driver for the CCS811 ultra-low power digital gas sensor for monitoring indoor air quality
Stars: ✭ 12 (-74.47%)
Mutual labels:  i2c
Raspberry-ssd1306
ssd1306 Command Line Tool for Raspberry Pi
Stars: ✭ 34 (-27.66%)
Mutual labels:  i2c
ATtiny85-TinyCharger
Single-Cell Li-Ion Battery Charger with Monitoring
Stars: ✭ 20 (-57.45%)
Mutual labels:  attiny
arduino-sps
Arduino library for Sensirion SPS30
Stars: ✭ 36 (-23.4%)
Mutual labels:  i2c
ustd
Micro-standard-library providing minimal and portable array, queue and map for attiny avr, arduinos, esp8266/32 and linux, mac
Stars: ✭ 14 (-70.21%)
Mutual labels:  attiny
ATtiny85-USB-C-Tester
Simple USB-C Power Delivery Tester
Stars: ✭ 20 (-57.45%)
Mutual labels:  attiny
wbi2c
Wishbone controlled I2C controllers
Stars: ✭ 25 (-46.81%)
Mutual labels:  i2c

Build Status

USIWire

Arduino Wire compatible library, supporting I²C, I2C, IIC and/or (Two Wire Interface) TWI for Atmel ATTiny microprocessors utilizing the Universal Serial Interface (USI). This library proviedes Master and Slave functionality.

Installation

This library can easily be installed via Arduino Library Manager.

Usage and Support

Please have a look to the original Arduino Wire Library. Just include the library in your sketch:

#include <USIWire.h>

This library is tested to compile against:

  • ATTiny24/ATTiny44/ATTiny84
  • ATTiny25/ATTiny45/ATTiny85
  • ATTiny261/ATTiny461/ATTiny861
  • ATTiny87/ATTiny167
  • ATTiny2313/ATTiny4313
  • ATTiny1634

ATTiny support for Arduino is provided by ATTiny Core.

Features

  • Provide I2C/TWI for ATTiny platforms with USI support.
  • Support for slave and master mode.
  • Full callback support in slave mode including proper stop condition detection in the interrupt routine.
  • Low usage of dynamic memory. Only 46 bytes including buffer.
  • Use of one common 32 byte buffer for master and slave.
  • Compatibility to Arduino Wire Library 1.0 and later.
  • Start from scratch with ATMEL "AVR312 USI as I2C slave" and "AVR310 USI as I2C master" examples. All changes were done via version control.
  • Support the Arduino Library Manager for installation.
  • Test suites for master and slave mode that run with USIWire and Arduino Wire to validate, e.g., System Management Bus (SMBus) communication, proper detection of start and stop condition detection, wake up from sleep modes.

Differences to Arduino Wire Library

To reduce the memory footprint of this library, a common buffer of 32 byte for slave and master mode is used. This require some care in the sketches:

  • Remove of inheritance of Stream (saves 20 bytes of dynamic memory). Thought, all important write() functions are supported.
  • One common buffer for slave and master mode: This do not allow, to operate simultaneously in master and slave mode. Thought, switching between master and slave mode is possible with end() and begin().
  • Only one buffer for rx and tx operations in master mode: read() can not be used in between of beginTransmission() and endTransmission().
  • In slave mode, the common buffer is split into rx and tx buffer.
  • After calling the onReceive callback, the slave rx buffer is cleared.

Contributing

Contributions are welcome! If you find an bug, feel free to open an issue at GitHub or even a pull requests ;-).

Acknowledgement

  • Arduino team for the Arduino Wire Library
  • Authors and contributor of TinyWireS and TinyWireM for some inspirations.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].