Sunday, September 18, 2011

IIC or I2C or TWI

The TWI bus

Good tutorial from DigiKey

other training modules of electronic parts from digikey

A good introduction to IIC with an Arduino Focus is here.


The Arduino library with functions that handle the TWI bus is the Wire Library

A good example of using IIC eeproms with Arduinos is here.

A typical IIC device is the eeprom below.





An Arduino setup


and you can join up two Arduinos using the IIC bus




This code worked for me straight from the forum to the freetronics eleven at 24LC256.

And here's the data on the24LC256 eeprom.


3 comments:

  1. Sadly, Jane-Maree thinks she's karked another EEPROM.

    It was working nicely in D208, doing all the things it was supposed to do, & printing nicely to the Serial monitor.

    Now I'm in D209 - I've hooked it up, & I'm getting the same gibberish that I got from my previous (24LC08) EEPROMs.

    I'm obviously doing something wrong, despite my own warnings on the subject, but what?

    I don't know..[sigh]
    Another one bites the dust [sniffle] :-(

    ReplyDelete
  2. Maybe I've been too hasty [brightens a little]..
    I'm looking at:
    http://arduino.cc/playground/Main/LibraryForI2CEEPROM
    & wondering if That's The Problem!

    I'll go back to D208 & give it another shot..
    ..but I'm feeling rather deflated. It really does look like an Expired Eeprom.

    ReplyDelete
  3. well, the Sky Fell On My Head!
    Didn't it.. (hehe) [sigh]

    working nicely thank you -BUT ONLY IF I DON'T OVERRUN THE BUFFER SIZE (duh!)

    ReplyDelete