<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.mcselec.com/bavr/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.mcselec.com/bavr/index.php?action=history&amp;feed=atom&amp;title=I2CSTART</id>
		<title>I2CSTART - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.mcselec.com/bavr/index.php?action=history&amp;feed=atom&amp;title=I2CSTART"/>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;action=history"/>
		<updated>2026-05-03T19:26:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.6</generator>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5445&amp;oldid=prev</id>
		<title>Admin at 19:00, 17 January 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5445&amp;oldid=prev"/>
				<updated>2017-01-17T19:00:59Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:00, 17 January 2017&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 126:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 126:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By defining the _TWI_STOP_NEW constant, you can use the new, preferred method which will give a STOP command and then poll the status till the bus is actually free. Since not all Xmega respond well to this, this is made an option.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By defining the _TWI_STOP_NEW constant, you can use the new, preferred method which will give a STOP command and then poll the status till the bus is actually free. Since not all Xmega respond well to this, this is made an option.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span style=&amp;quot;font-size: 14pt;&amp;quot;&amp;gt;ASM&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&amp;lt;span style=&amp;quot;font-size: 14pt;&amp;quot;&amp;gt;ASM&amp;lt;/span&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The I2C routines are located in the i2c.lib/i2c.lbx files.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The I2C routines are located in the i2c.lib/i2c.lbx files.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5444&amp;oldid=prev</id>
		<title>Admin at 19:00, 17 January 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5444&amp;oldid=prev"/>
				<updated>2017-01-17T19:00:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:00, 17 January 2017&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 114:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 114:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since the repeated start is not compatible with the one from i2c.lib, you need to specify yourself that you want to use the improved lib. See also&amp;amp;nbsp;[[I2CV2]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since the repeated start is not compatible with the one from i2c.lib, you need to specify yourself that you want to use the improved lib. See also&amp;amp;nbsp;[[I2CV2]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span style=&amp;quot;font-size: 14pt;&amp;quot;&amp;gt;I2CSTOP and Xmega&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&amp;lt;span style=&amp;quot;font-size: 14pt;&amp;quot;&amp;gt;I2CSTOP and Xmega&amp;lt;/span&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The I2CSTOP statement on the Xmega can be influenced by defining a constant named _TWI_STOP_NEW&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The I2CSTOP statement on the Xmega can be influenced by defining a constant named _TWI_STOP_NEW&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5443&amp;oldid=prev</id>
		<title>Admin at 19:00, 17 January 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5443&amp;oldid=prev"/>
				<updated>2017-01-17T19:00:13Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:00, 17 January 2017&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 114:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 114:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since the repeated start is not compatible with the one from i2c.lib, you need to specify yourself that you want to use the improved lib. See also&amp;amp;nbsp;[[I2CV2]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since the repeated start is not compatible with the one from i2c.lib, you need to specify yourself that you want to use the improved lib. See also&amp;amp;nbsp;[[I2CV2]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;class&lt;/del&gt;=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;f_Header&lt;/del&gt;&amp;quot;&amp;gt;ASM&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;style&lt;/ins&gt;=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;font-size: 14pt;&amp;quot;&amp;gt;I2CSTOP and Xmega&amp;lt;/span&amp;gt; =&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The I2CSTOP statement on the Xmega can be influenced by defining a constant named _TWI_STOP_NEW&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The value does not matter. So you can add&amp;amp;nbsp;: &amp;amp;nbsp;CONST _TWI_STOP_NEW = 1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;This code will use the preferred code to generate an I2CSTOP command. Why this option? Some Xmega do not respond well to a command to free the bus. As a work around , multiple commands are given till the bus is free.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Some slave chips might have a problem with that. For this reason, the DEFAULT is the old way to send multiple STOP commands till the bus is free.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;By defining the _TWI_STOP_NEW constant, you can use the new, preferred method which will give a STOP command and then poll the status till the bus is actually free. Since not all Xmega respond well to this, this is made an option.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;= &amp;lt;span style=&amp;quot;font-size: 14pt;&lt;/ins&gt;&amp;quot;&amp;gt;ASM&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The I2C routines are located in the i2c.lib/i2c.lbx files.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The I2C routines are located in the i2c.lib/i2c.lbx files.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5442&amp;oldid=prev</id>
		<title>Admin at 18:59, 17 January 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=5442&amp;oldid=prev"/>
				<updated>2017-01-17T18:59:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:59, 17 January 2017&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Action&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Action&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I2CSTART generates an I2C start condition.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CSTART&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &lt;/ins&gt;generates an I2C start condition.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I2CREPSTART generates an I2C repeated start condition.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CREPSTART&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &lt;/ins&gt;generates an I2C repeated start condition.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I2CSTOP generates an I2C stop condition.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CSTOP&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &lt;/ins&gt;generates an I2C stop condition.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I2CRBYTE receives one byte from an I2C-device.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CRBYTE&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &lt;/ins&gt;receives one byte from an I2C-device.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I2CWBYTE sends one byte to an I2C-device.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CWBYTE&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &lt;/ins&gt;sends one byte to an I2C-device.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4656&amp;oldid=prev</id>
		<title>Admin at 11:16, 4 February 2014</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4656&amp;oldid=prev"/>
				<updated>2014-02-04T11:16:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 11:16, 4 February 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 126:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 126:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;See also&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;See also&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[I2CSEND]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CRECEIVE]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CSTOP]],&amp;amp;nbsp;[[I2CRBYTE]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CWBYTE]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[I2CSEND]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CRECEIVE]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CSTOP]],&amp;amp;nbsp;[[I2CRBYTE]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CWBYTE&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]]&amp;amp;nbsp;, [[I2CV2&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4655&amp;oldid=prev</id>
		<title>Admin at 11:14, 4 February 2014</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4655&amp;oldid=prev"/>
				<updated>2014-02-04T11:14:59Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 11:14, 4 February 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 102:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 102:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[File:Notice.jpg|notice]]&amp;lt;span class=&amp;quot;f_ImageCaption&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;When using a repeated start, you must use&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CREPSTART&amp;lt;/span&amp;gt;&amp;amp;nbsp;on the XMega !&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[File:Notice.jpg|notice]]&amp;lt;span class=&amp;quot;f_ImageCaption&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;When using a repeated start, you must use&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CREPSTART&amp;lt;/span&amp;gt;&amp;amp;nbsp;on the XMega&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&lt;/ins&gt;!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 110:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 110:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&lt;/del&gt;&amp;amp;nbsp;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;All I2C statements are master mode statements. They will code from the i2c.lib. There is also an improved version of this library available named i2cv2.lib&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Since the repeated start is not compatible with the one from i2c.lib, you need to specify yourself that you want to use the improved lib. See also&lt;/ins&gt;&amp;amp;nbsp;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[I2CV2]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;ASM&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;ASM&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4639&amp;oldid=prev</id>
		<title>Admin at 19:12, 24 August 2013</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4639&amp;oldid=prev"/>
				<updated>2013-08-24T19:12:49Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:12, 24 August 2013&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 130:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 130:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Example &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(using Software I2C Routines)&lt;/ins&gt;&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;br/&amp;gt;&amp;lt;source lang=&amp;quot;bascomavr&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;br/&amp;gt;&amp;lt;source lang=&amp;quot;bascomavr&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 213:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 213:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;' I2cstop 'stop condition&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;' I2cstop 'stop condition&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;' Waitms 10&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;' Waitms 10&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Xmega Example&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;&lt;/ins&gt;Xmega Example&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; =&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;source lang=&amp;quot;bascomavr&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'----------------------------------------------------------------&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'----------------------------------------------------------------&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;' (c) 1995-2010, MCS&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;' (c) 1995-2010, MCS&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4638&amp;oldid=prev</id>
		<title>Admin at 19:11, 24 August 2013</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=4638&amp;oldid=prev"/>
				<updated>2013-08-24T19:11:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:11, 24 August 2013&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 92:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 92:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;These statements are provided as an addition to the I2CSEND and I2CRECEIVE statements.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;These statements are provided as an addition to the I2CSEND and I2CRECEIVE statements.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;While &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;I2CSEND &lt;/del&gt;and I2CRECEIVE are well suited for most tasks, a slave chip might need a special sequence that is not possible with &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;I2C routines.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;While&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;lt;span style=&amp;quot;font-family: 'Courier New'; font-weight: bold; color: rgb(0, 0, 128);&amp;quot;&amp;gt;I2csend&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Courier New';&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/ins&gt;and&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CRECEIVE&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt;&amp;amp;nbsp;&lt;/ins&gt;are well suited for most tasks, a slave chip might need a special sequence that is not possible with &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;this &lt;/ins&gt;I2C routines.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When an error occurs, the internal &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ERR &lt;/del&gt;variable will return 1. Otherwise it will be set to 0.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When an error occurs, the internal &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Err &lt;/ins&gt;variable will return 1. Otherwise it will be set to 0.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The Xmega has multiple TWI interfaces. You can use a channel to specify the TWI interface.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The Xmega has multiple TWI interfaces. You can use a channel to specify the TWI interface.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When using a repeated start, you must use I2CREPSTART on the XMega&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[File:Notice.jpg|notice]]&amp;lt;span class=&amp;quot;f_ImageCaption&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/ins&gt;When using a repeated start, you must use&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CREPSTART&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt;&amp;amp;nbsp;&lt;/ins&gt;on the XMega &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Normal AVR processors may use either I2CSTART or I2CREPSTART.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Normal AVR processors may use&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;lt;span style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;&lt;/ins&gt;either&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CSTART&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;span style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;&lt;/ins&gt;or&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;&lt;/ins&gt;I2CREPSTART&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=708&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;= &lt;span class=&quot;f_Header&quot;&gt;Action&lt;/span&gt; =  I2CSTART generates an I2C start condition.  I2CREPSTART generates an I2C repeated start condition.  I2CSTOP generates an I2C stop con...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=I2CSTART&amp;diff=708&amp;oldid=prev"/>
				<updated>2013-02-11T18:34:05Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Action&amp;lt;/span&amp;gt; =  I2CSTART generates an I2C start condition.  I2CREPSTART generates an I2C repeated start condition.  I2CSTOP generates an I2C stop con...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Action&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
I2CSTART generates an I2C start condition.&lt;br /&gt;
&lt;br /&gt;
I2CREPSTART generates an I2C repeated start condition.&lt;br /&gt;
&lt;br /&gt;
I2CSTOP generates an I2C stop condition.&lt;br /&gt;
&lt;br /&gt;
I2CRBYTE receives one byte from an I2C-device.&lt;br /&gt;
&lt;br /&gt;
I2CWBYTE sends one byte to an I2C-device.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Syntax&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CSTART&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CREPSTART&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CSTOP&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CRBYTE&amp;lt;/span&amp;gt;&amp;amp;nbsp;var, ack/nack&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CWBYTE&amp;lt;/span&amp;gt;&amp;amp;nbsp;val&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Syntax Xmega&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CSTART #&amp;lt;/span&amp;gt;const&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CREPSTART #&amp;lt;/span&amp;gt;const&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CSTOP #&amp;lt;/span&amp;gt;const&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CRBYTE&amp;lt;/span&amp;gt;&amp;amp;nbsp;var, ack/nack ,&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;const&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;I2CWBYTE&amp;lt;/span&amp;gt;&amp;amp;nbsp;val ,&amp;amp;nbsp;&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;const&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Remarks&amp;lt;/span&amp;gt; =&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0px; margin: 0px 0px 0px 4px;&amp;quot;&amp;gt;&lt;br /&gt;
{| width=&amp;quot;571&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;vertical-align: top;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;13%&amp;quot; style=&amp;quot;width: 71px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
Var&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;85%&amp;quot; style=&amp;quot;width: 491px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
A variable that receives the value from the I2C-device.&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;vertical-align: top;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;13%&amp;quot; style=&amp;quot;width: 71px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
ack/nack&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;85%&amp;quot; style=&amp;quot;width: 491px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
Specify ACK if there are more bytes to read.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specify NACK if it is the last byte to read.&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;vertical-align: top;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;13%&amp;quot; style=&amp;quot;width: 71px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
Val&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;85%&amp;quot; style=&amp;quot;width: 491px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
A variable or constant to write to the I2C-device.&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;vertical-align: top;&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;13%&amp;quot; style=&amp;quot;width: 71px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;const&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; width=&amp;quot;85%&amp;quot; style=&amp;quot;width: 491px; border: 1px solid rgb(0, 0, 0);&amp;quot; | &lt;br /&gt;
For the Xmega, a channel constant that was specified with OPEN.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These statements are provided as an addition to the I2CSEND and I2CRECEIVE statements.&lt;br /&gt;
&lt;br /&gt;
While I2CSEND and I2CRECEIVE are well suited for most tasks, a slave chip might need a special sequence that is not possible with the I2C routines.&lt;br /&gt;
&lt;br /&gt;
When an error occurs, the internal ERR variable will return 1. Otherwise it will be set to 0.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The Xmega has multiple TWI interfaces. You can use a channel to specify the TWI interface.&lt;br /&gt;
&lt;br /&gt;
When using a repeated start, you must use I2CREPSTART on the XMega.&lt;br /&gt;
&lt;br /&gt;
Normal AVR processors may use either I2CSTART or I2CREPSTART.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;ASM&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
The I2C routines are located in the i2c.lib/i2c.lbx files.&lt;br /&gt;
&lt;br /&gt;
For the XMega, the routines are located in the xmega.lib file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;See also&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
[[I2CSEND]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CRECEIVE]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CSTOP]],&amp;amp;nbsp;[[I2CRBYTE]]&amp;amp;nbsp;,&amp;amp;nbsp;[[I2CWBYTE]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;source lang=&amp;quot;bascomavr&amp;quot;&amp;gt;&lt;br /&gt;
'-----------------------------------------------------------------------------------------&lt;br /&gt;
'name : i2c.bas&lt;br /&gt;
'copyright : (c) 1995-2005, MCS Electronics&lt;br /&gt;
'purpose : demo: I2CSEND and I2CRECEIVE&lt;br /&gt;
'micro : Mega48&lt;br /&gt;
'suited for demo : yes&lt;br /&gt;
'commercial addon needed : no&lt;br /&gt;
'-----------------------------------------------------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
$regfile = &amp;quot;m48def.dat&amp;quot; ' specify the used micro&lt;br /&gt;
$crystal = 4000000 ' used crystal frequency&lt;br /&gt;
$baud = 19200 ' use baud rate&lt;br /&gt;
$hwstack = 32 ' default use 32 for the hardware stack&lt;br /&gt;
$swstack = 10 ' default use 10 for the SW stack&lt;br /&gt;
$framesize = 40 ' default use 40 for the frame space&lt;br /&gt;
 &lt;br /&gt;
Config Scl = Portb.4&lt;br /&gt;
Config Sda = Portb.5&lt;br /&gt;
 &lt;br /&gt;
Declare Sub Write_eeprom(byval Adres As Byte , Byval Value As Byte)&lt;br /&gt;
Declare Sub Read_eeprom(byval Adres As Byte , Value As Byte)&lt;br /&gt;
 &lt;br /&gt;
Const Addressw = 174 'slave write address&lt;br /&gt;
Const Addressr = 175 'slave read address&lt;br /&gt;
 &lt;br /&gt;
Dim B1 As Byte , Adres As Byte , Value As Byte 'dim byte&lt;br /&gt;
 &lt;br /&gt;
Call Write_eeprom(1 , 3) 'write value of three to address 1 of EEPROM&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Call Read_eeprom(1 , Value) : Print Value 'read it back&lt;br /&gt;
Call Read_eeprom(5 , Value) : Print Value 'again for address 5&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
'-------- now write to a PCF8474 I/O expander -------&lt;br /&gt;
I2csend &amp;amp;H40 , 255 'all outputs high&lt;br /&gt;
I2creceive &amp;amp;H40 , B1 'retrieve input&lt;br /&gt;
Print &amp;quot;Received data &amp;quot; ; B1 'print it&lt;br /&gt;
End&lt;br /&gt;
 &lt;br /&gt;
Rem Note That The Slaveaddress Is Adjusted Automaticly With I2csend &amp;amp; I2creceive&lt;br /&gt;
Rem This Means You Can Specify The Baseaddress Of The Chip.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
'sample of writing a byte to EEPROM AT2404&lt;br /&gt;
Sub Write_eeprom(byval Adres As Byte , Byval Value As Byte)&lt;br /&gt;
 I2cstart 'start condition&lt;br /&gt;
 I2cwbyte Addressw 'slave address&lt;br /&gt;
 I2cwbyte Adres 'asdress of EEPROM&lt;br /&gt;
 I2cwbyte Value 'value to write&lt;br /&gt;
 I2cstop 'stop condition&lt;br /&gt;
 Waitms 10 'wait for 10 milliseconds&lt;br /&gt;
End Sub&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
'sample of reading a byte from EEPROM AT2404&lt;br /&gt;
Sub Read_eeprom(byval Adres As Byte , Value As Byte)&lt;br /&gt;
I2cstart 'generate start&lt;br /&gt;
I2cwbyte Addressw 'slave adsress&lt;br /&gt;
I2cwbyte Adres 'address of EEPROM&lt;br /&gt;
I2cstart 'repeated start&lt;br /&gt;
I2cwbyte Addressr 'slave address (read)&lt;br /&gt;
I2crbyte Value , Nack 'read byte&lt;br /&gt;
I2cstop 'generate stop&lt;br /&gt;
End Sub&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
' when you want to control a chip with a larger memory like the 24c64 it requires an additional byte&lt;br /&gt;
' to be sent (consult the datasheet):&lt;br /&gt;
' Wires from the I2C address that are not connected will default to 0 in most cases!&lt;br /&gt;
 &lt;br /&gt;
' I2cstart 'start condition&lt;br /&gt;
' I2cwbyte &amp;amp;B1010_0000 'slave address&lt;br /&gt;
' I2cwbyte H 'high address&lt;br /&gt;
' I2cwbyte L 'low address&lt;br /&gt;
' I2cwbyte Value 'value to write&lt;br /&gt;
' I2cstop 'stop condition&lt;br /&gt;
' Waitms 10&lt;br /&gt;
 &lt;br /&gt;
Xmega Example&lt;br /&gt;
'----------------------------------------------------------------&lt;br /&gt;
' (c) 1995-2010, MCS&lt;br /&gt;
' xm128-TWI.bas&lt;br /&gt;
' This sample demonstrates the Xmega128A1 TWI&lt;br /&gt;
'-----------------------------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
$regfile = &amp;quot;xm128a1def.dat&amp;quot;&lt;br /&gt;
$crystal = 32000000&lt;br /&gt;
$hwstack = 64&lt;br /&gt;
$swstack = 40&lt;br /&gt;
$framesize = 40&lt;br /&gt;
 &lt;br /&gt;
'include the following lib and code, the routines will be replaced since they are a workaround&lt;br /&gt;
$lib &amp;quot;xmega.lib&amp;quot;&lt;br /&gt;
$external _xmegafix_clear&lt;br /&gt;
$external _xmegafix_rol_r1014&lt;br /&gt;
 &lt;br /&gt;
Dim S As String * 20&lt;br /&gt;
 &lt;br /&gt;
'first enable the osc of your choice&lt;br /&gt;
Config Osc = Enabled , 32mhzosc = Enabled&lt;br /&gt;
 &lt;br /&gt;
'configure the systemclock&lt;br /&gt;
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1&lt;br /&gt;
 &lt;br /&gt;
Dim N As String * 16 , B As Byte&lt;br /&gt;
Config Com1 = 19200 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8&lt;br /&gt;
Config Input1 = Cr , Echo = Crlf ' CR is used for input, we echo back CR and LF&lt;br /&gt;
 &lt;br /&gt;
Open &amp;quot;COM1:&amp;quot; For Binary As #1&lt;br /&gt;
' ^^^^ change from COM1-COM8&lt;br /&gt;
 &lt;br /&gt;
Print #1 , &amp;quot;Xmega revision:&amp;quot; ; Mcu_revid ' make sure it is 7 or higher !!! lower revs have many flaws&lt;br /&gt;
 &lt;br /&gt;
Const Usechannel = 1&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Dim B1 As Byte , B2 As Byte&lt;br /&gt;
Dim W As Word At B1 Overlay&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Open &amp;quot;twic&amp;quot; For Binary As #4 ' or use TWID,TWIE oR TWIF&lt;br /&gt;
Config Twi = 100000 'CONFIG TWI will ENABLE the TWI master interface&lt;br /&gt;
'you can also use TWIC, TWID, TWIE of TWIF&lt;br /&gt;
 &lt;br /&gt;
#if Usechannel = 1&lt;br /&gt;
 I2cinit #4&lt;br /&gt;
#else&lt;br /&gt;
I2cinit&lt;br /&gt;
#endif&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Do&lt;br /&gt;
I2cstart&lt;br /&gt;
Waitms 20&lt;br /&gt;
I2cwbyte &amp;amp;H70 ' slave address write&lt;br /&gt;
Waitms 20&lt;br /&gt;
I2cwbyte &amp;amp;B10101010 ' write command&lt;br /&gt;
Waitms 20&lt;br /&gt;
I2cwbyte 2&lt;br /&gt;
Waitms 20&lt;br /&gt;
I2cstop&lt;br /&gt;
Print &amp;quot;Error : &amp;quot; ; Err ' show error status&lt;br /&gt;
 &lt;br /&gt;
'waitms 50&lt;br /&gt;
Print &amp;quot;start&amp;quot;&lt;br /&gt;
I2cstart&lt;br /&gt;
Print &amp;quot;Error : &amp;quot; ; Err ' show error&lt;br /&gt;
I2cwbyte &amp;amp;H71&lt;br /&gt;
Print &amp;quot;Error : &amp;quot; ; Err ' show error&lt;br /&gt;
I2crbyte B1 , Ack&lt;br /&gt;
Print &amp;quot;Error : &amp;quot; ; Err ' show error&lt;br /&gt;
I2crbyte B2 , Nack&lt;br /&gt;
Print &amp;quot;Error : &amp;quot; ; Err ' show error&lt;br /&gt;
I2cstop&lt;br /&gt;
Print &amp;quot;received A/D : &amp;quot; ; W ; &amp;quot;-&amp;quot; ; B1 ; &amp;quot;-&amp;quot; ; B2&lt;br /&gt;
Waitms 500 'wait a bit&lt;br /&gt;
Loop&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Dim J As Byte , C As Byte , K As Byte&lt;br /&gt;
Dim Twi_start As Byte ' you MUST dim this variable since it is used by the lib&lt;br /&gt;
 &lt;br /&gt;
'determine if we have an i2c slave on the bus&lt;br /&gt;
For J = 0 To 200 Step 2&lt;br /&gt;
Print J&lt;br /&gt;
#if Usechannel = 1&lt;br /&gt;
 I2cstart #4&lt;br /&gt;
#else&lt;br /&gt;
 I2cstart&lt;br /&gt;
#endif&lt;br /&gt;
 &lt;br /&gt;
 I2cwbyte J&lt;br /&gt;
 If Err = 0 Then ' no errors&lt;br /&gt;
 Print &amp;quot;FOUND : &amp;quot; ; Hex(j)&lt;br /&gt;
 'write some value to the pcf8574A&lt;br /&gt;
 #if Usechannel = 1&lt;br /&gt;
 I2cwbyte &amp;amp;B1100_0101 , #4&lt;br /&gt;
 #else&lt;br /&gt;
 I2cwbyte &amp;amp;B1100_0101&lt;br /&gt;
 #endif&lt;br /&gt;
 Print Err&lt;br /&gt;
 Exit For&lt;br /&gt;
 End If&lt;br /&gt;
 #if Usechannel = 1&lt;br /&gt;
 I2cstop #4&lt;br /&gt;
 #else&lt;br /&gt;
 I2cstop&lt;br /&gt;
 #endif&lt;br /&gt;
Next&lt;br /&gt;
#if Usechannel = 1&lt;br /&gt;
 I2cstop #4&lt;br /&gt;
#else&lt;br /&gt;
 I2cstop&lt;br /&gt;
#endif&lt;br /&gt;
 &lt;br /&gt;
#if Usechannel = 1&lt;br /&gt;
I2cstart #4&lt;br /&gt;
I2cwbyte &amp;amp;H71 , #4 'read address&lt;br /&gt;
I2crbyte J , Ack , #4&lt;br /&gt;
Print Bin(j) ; &amp;quot; err:&amp;quot; ; Err&lt;br /&gt;
I2crbyte J , Ack , #4&lt;br /&gt;
Print Bin(j) ; &amp;quot; err:&amp;quot; ; Err&lt;br /&gt;
I2crbyte J , Nack , #4&lt;br /&gt;
Print Bin(j) ; &amp;quot; err:&amp;quot; ; Err&lt;br /&gt;
I2cstop #4&lt;br /&gt;
#else&lt;br /&gt;
I2cstart&lt;br /&gt;
I2cwbyte &amp;amp;H71 'read address&lt;br /&gt;
I2crbyte J , Ack&lt;br /&gt;
Print Bin(j) ; &amp;quot; err:&amp;quot; ; Err&lt;br /&gt;
I2crbyte J , Ack&lt;br /&gt;
Print Bin(j) ; &amp;quot; err:&amp;quot; ; Err&lt;br /&gt;
I2crbyte J , Nack&lt;br /&gt;
Print Bin(j) ; &amp;quot; err:&amp;quot; ; Err&lt;br /&gt;
I2cstop&lt;br /&gt;
#endif&lt;br /&gt;
 &lt;br /&gt;
'try a transaction&lt;br /&gt;
#if Usechannel = 1&lt;br /&gt;
I2csend &amp;amp;H70 , 255 , #4 ' all 1&lt;br /&gt;
Waitms 1000&lt;br /&gt;
I2csend &amp;amp;H70 , 0 , #4 'all 0&lt;br /&gt;
#else&lt;br /&gt;
I2csend &amp;amp;H70 , 255&lt;br /&gt;
Waitms 1000&lt;br /&gt;
I2csend &amp;amp;H70 , 0&lt;br /&gt;
#endif&lt;br /&gt;
Print Err&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
'read transaction&lt;br /&gt;
Dim Var As Byte&lt;br /&gt;
Var = &amp;amp;B11111111&lt;br /&gt;
#if Usechannel = 1&lt;br /&gt;
I2creceive &amp;amp;H70 , Var , 1 , 1 , #4 ' send and receive&lt;br /&gt;
Print Bin(var) ; &amp;quot;-&amp;quot; ; Err&lt;br /&gt;
I2creceive &amp;amp;H70 , Var , 0 , 1 , #4 ' just receive&lt;br /&gt;
Print Bin(var) ; &amp;quot;-&amp;quot; ; Err&lt;br /&gt;
#else&lt;br /&gt;
I2creceive &amp;amp;H70 , Var , 1 , 1 ' send and receive&lt;br /&gt;
Print Bin(var) ; &amp;quot;-&amp;quot; ; Err&lt;br /&gt;
I2creceive &amp;amp;H70 , Var , 0 , 1 ' just receive&lt;br /&gt;
Print Bin(var) ; &amp;quot;-&amp;quot; ; Err&lt;br /&gt;
#endif&lt;br /&gt;
 &lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;br/&amp;gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
[[Category:BASCOM Language Reference]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>