?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{FILE START}

library

?curdirlinks? - Rev 6

?prevdifflink? - Blame - ?getfile?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Procyon AVRlib: I2C Serial Interface Function Library (i2c.c)</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>I2C Serial Interface Function Library (i2c.c)<br>
<small>
[<a class="el" href="group__driver__avr.html">Drivers (for AVR peripherals)</a>]</small>
</h1><div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "<a class="code" href="i2c_8h.html">i2c.h</a>"</span> 
</pre></div> <dl compact><dt><b>Overview</b></dt><dd>This library provides the high-level functions needed to use the I2C serial interface supported by the hardware of several AVR processors. The library is functional but has not been exhaustively tested yet and is still expanding.  Thanks to the standardization of the I2C protocol and register access, the send and receive commands are everything you need to talk to thousands of different I2C devices including: EEPROMS, Flash memory, MP3 players, A/D and D/A converters, electronic potentiometers, etc.</dd></dl>
<dl compact><dt><b>About I2C</b></dt><dd>I2C (pronounced "eye-squared-see") is a two-wire bidirectional network designed for easy transfer of information between a wide variety of intelligent devices. Many of the Atmel AVR series processors have hardware support for transmitting and receiving using an I2C-type bus. In addition to the AVRs, there are thousands of other parts made by manufacturers like Philips, Maxim, National, TI, etc that use I2C as their primary means of communication and control. Common device types are A/D &amp; D/A converters, temp sensors, intelligent battery monitors, MP3 decoder chips, EEPROM chips, multiplexing switches, etc.</dd></dl>
I2C uses only two wires (SDA and SCL) to communicate bidirectionally between devices. I2C is a multidrop network, meaning that you can have several devices on a single bus. Because I2C uses a 7-bit number to identify which device it wants to talk to, you cannot have more than 127 devices on a single bus.<p>
I2C ordinarily requires two 4.7K pull-up resistors to power (one each on SDA and SCL), but for small numbers of devices (maybe 1-4), it is enough to activate the internal pull-up resistors in the AVR processor. To do this, set the port pins, which correspond to the I2C pins SDA/SCL, high. For example, on the mega163, sbi(PORTC, 0); sbi(PORTC, 1);.<p>
For complete information about I2C, see the Philips Semiconductor website. They created I2C and have the largest family of devices that work with I2C.<p>
: Many manufacturers market I2C bus devices under a different or generic bus name like "Two-Wire Interface". This is because Philips still holds "I2C" as a trademark. For example, SMBus and SMBus devices are hardware compatible and closely related to I2C. They can be directly connected to an I2C bus along with other I2C devices are are generally accessed in the same way as I2C devices. SMBus is often found on modern motherboards for temp sensing and other low-level control tasks. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:09 2006 for Procyon AVRlib by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
{FILE END}
{FOOTER START}

Powered by WebSVN v2.8.3