Wiring Forum
Programming Questions & Help >> Integration >> Using TWI or I2C

Message started by johnmchilton on 08/01/07 at 19:53:55

Title: Using TWI or I2C
Post by johnmchilton on 08/01/07 at 19:53:55
I noticed that on the I/O Board>Overview>Pins with Special Functionality section, ISP, TWI, and I2C are mentioned. How does that work in software? Can somebody point me to a learning resource of how to use this functionality? It says I can network other Wiring board and get use all kinds of devices with only these two pins, and I have an application that needs exactly that sort of functionality. But the page doesn't say how to use the pins or where to look...

Any help or links are greatly appreciated, thanks!

Title: Re: Using TWI or I2C
Post by barragan on 08/01/07 at 22:56:33
hi john, the TWI (or I2C) has a special library, you can see the documentation for it here: http://wiring.org.co/reference/libraries/Wire/index.html
there are also examples that demonstrate the usage, check this example, http://wiring.org.co/learning/examples/SFRRanger_reader.html it shows how to use the library with an I2C ranger sensor.

Title: Re: Using TWI or I2C
Post by johnmchilton on 08/02/07 at 11:34:27
Thanks, that's exactly what I was looking for. Though now that I've read the code, I realize it won't work for my project. That's another story though so I'm asking in another thread.

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.