<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://forum.robosavvy.com/feed.php?f=17&amp;t=3782" />

<title>RoboSavvy Forum</title>
<subtitle>Robosavvy Forum: The largest online community of Humanoid Robot Builders</subtitle>
<link href="http://forum.robosavvy.com/index.php" />
<updated>2009-08-08T15:50:48+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=17&amp;t=3782</id>
<entry>
<author><name><![CDATA[maestro]]></name></author>
<updated>2009-08-08T15:50:48+01:00</updated>
<published>2009-08-08T15:50:48+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21196#p21196</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21196#p21196"/>
<title type="html"><![CDATA[i2c programming on Linux]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21196#p21196"><![CDATA[
Hi roboard<br /><br />Thanks for your answer. It works perfect. <br /><br />If I start i2c communication with  i2cmaster_StartN(0,0x40, I2C_WRITE, 1) I have to continue with i2cmaster_WriteN().<br /><br />thanks again.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1606">maestro</a> — Sat Aug 08, 2009 3:50 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[roboard]]></name></author>
<updated>2009-08-08T09:03:46+01:00</updated>
<published>2009-08-08T09:03:46+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21187#p21187</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21187#p21187"/>
<title type="html"><![CDATA[Re: i2c programming on Linux]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21187#p21187"><![CDATA[
<blockquote><div><cite>maestro wrote:</cite><br /><dl class="codebox"><dt>Code: </dt><dd><code>......<br /><br />      i2cmaster_StartN&#40;0,0x40, I2C_WRITE, 1&#41;;<br />      i2c0master_WriteLast&#40;lightshow&#41;;<br />......</code></dd></dl><br /></div></blockquote><br /><br />Hi, please ensure that you don't modify the source of RoBoIO library and include &quot;ROBOARD.H&quot;; then change the two lines above as follows and try again:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>......<br />if &#40;!i2c0master_StartN&#40;0x40, I2C_WRITE, 1&#41;&#41;<br />&#123;<br />    printf&#40;&quot;START fail &#40;%s&#41;...try again\n&quot;, roboio_GetErrMsg&#40;&#41;&#41;;<br />    if &#40;!i2c0master_StartN&#40;0x40, I2C_WRITE, 1&#41;&#41;<br />    &#123;<br />        printf&#40;&quot;START fail again &#40;%s&#41;\n&quot;, roboio_GetErrMsg&#40;&#41;&#41;;<br />        i2c_Close&#40;&#41;;<br />        return 0;<br />    &#125;<br />&#125;<br /><br />if &#40;!i2c0master_WriteN&#40;lightshow&#41;&#41;<br />&#123;<br />    printf&#40;&quot;WRITE fail &#40;%s&#41;\n&quot;, roboio_GetErrMsg&#40;&#41;&#41;;<br />    i2c_Close&#40;&#41;;<br />    return 0;<br />&#125;<br />......</code></dd></dl><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1542">roboard</a> — Sat Aug 08, 2009 9:03 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maestro]]></name></author>
<updated>2009-08-06T16:49:34+01:00</updated>
<published>2009-08-06T16:49:34+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21164#p21164</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21164#p21164"/>
<title type="html"><![CDATA[i2c programming on Linux]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3782&amp;p=21164#p21164"><![CDATA[
Hi,<br /><br />I try to program a Robard (Vortex86DX) operating with Linux.<br /><br />Alll I want to to is to send a the data 0x1 to a PCF8574. Pleas have look on my sourceCode:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>#include &quot;i2clib/i2c.h&quot;<br /><br />#include &lt;cstdio&gt;<br />#include &lt;unistd&gt;<br /><br />int main&#40;&#41; &#123;<br /><br />   char lightshow = 0x01; //0x80<br /><br />   int retval = 0;<br /><br />   printf&#40;&quot;Starting I2C test \n\n &quot;&#41;;<br /><br />   if &#40;!i2c_Initialize&#40;I2CIRQ_DISABLE&#41;&#41; &#123;<br />      perror&#40;&quot;Can't open I2c&quot;&#41;;<br />      return -5;<br />   &#125;<br />   if&#40; i2c0_SetSpeed&#40;I2CMODE_STANDARD, 100000L&#41; !=0 &#41;&#123;<br />      perror&#40;&quot;Couln't set i2c speed\n&quot;&#41;;<br />   &#125;<br />    do &#123;<br />      printf&#40;&quot;Blink \n\n &quot;&#41;;<br />      <br />      //START with address 0x40 to write 1 byte<br />      i2cmaster_StartN&#40;0,0x40, I2C_WRITE, 1&#41;;<br /><br />      i2c0master_WriteLast&#40;lightshow&#41;; //set SRF command register<br /><br />      usleep&#40;6000&#41;; //wait 3000ms<br /><br />      lightshow &lt;&lt;= lightshow;<br /><br />   &#125; while &#40;true&#41;; //press ctr+c to quit<br /><br />   i2c_Close&#40;&#41;;<br />   return retval;<br />&#125;<br /></code></dd></dl><br /><br />The PCF8574 charged with some LED doesn't move. On the oscilloscope I can't recognize any proper SCL signal neither a good shaped SDA signal. <br /><br />What I'm doing wrong? <br /><br />Thanks for any suggestions.<br /><br />[/code]<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1606">maestro</a> — Thu Aug 06, 2009 4:49 pm</p><hr />
]]></content>
</entry>
</feed>