Skip to content

eviveraart/SoftI2CMaster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoftI2CMaster

Software I2C Arduino library

This is a very fast and light-weight software I2C-master library written in assembler, which is based on Peter Fleury's software I2C library http://homepage.hispeed.ch/peterfleury/avr-software.html . It can use any pins on any AVR chip to drive the SDA and SCL lines.

It assumes a single master and does not support bus arbitration. It allows for clock stretching by slave devices and also can detect lock ups of the I2C bus, i.e., if the SCL line is held low indefinitely.

Even on 1MHz systems, you can get a transfer speed of around 40 kbit/sec, so you can use it to interface with SMbus devices.

In the program text before including this library, you have to define all the necessary constants such as SDA_PIN, SDA_PORT, SCL_PIN, and SCL_PORT.

For a full description see: http://playground.arduino.cc/Main/SoftwareI2CLibrary

Note: The port ports H and above on ATmega256 are not supported.

About

Software I2C Arduino library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 80.9%
  • C++ 19.1%