opkada.blogg.se

Attiny88 wire library
Attiny88 wire library










Primary devices will perform the usual calls (as seen on multiple micros, Arduino-like devices, etc.): start transaction, send address, read/write some bytes and stop transaction. Introducing a couple of C-written libraries ( primary and secondary) to allow I2C communication as a primary or secondary device! Here's a simple demonstration that uses the example code and the three attiny85's mini devices I made for it: The libraries

attiny88 wire library attiny88 wire library

While working with some NES Mini Controllers I started tinkering with the I2C protocol in order to connect them into some attiny85's micros I usually use on my projects ( I managed to do something interesting here).įirst I used a pure software implementation approach and made a bit-banging small driver to act as a primary device and being able to control multiple I2C devices I had (those controllers, some ssd1306 oled screens and so on) but then I started reading about the "native" AVR approach: the Two-Wire mode.Īfter more reading, poking and trying lots of external references (there're lots of I2C implementations out there: some of them worked, others didn't, another ones are more Arduino-intended, maybe a bunch of them are made on C++.) I wrote this pair of C basic libraries that allows me to manage the I2C protocol on my attiny85's both from primary and secondary sides. (full description and code for the libraries available on github - actually some parts of this section will be the same as the ones in the repo readme!)












Attiny88 wire library