<?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=5&amp;t=3802" />

<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-12T14:44:14+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=5&amp;t=3802</id>
<entry>
<author><name><![CDATA[clusher]]></name></author>
<updated>2009-08-12T14:44:14+01:00</updated>
<published>2009-08-12T14:44:14+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3802&amp;p=21280#p21280</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3802&amp;p=21280#p21280"/>
<title type="html"><![CDATA[Problems with a program!]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3802&amp;p=21280#p21280"><![CDATA[
There are a few examples of C programming around, so you should manage with some guidelines.<br /><br />Basically, you have to do the same that you do with communications with AX-12. Make an interrupt function like:<br /> <br /><dl class="codebox"><dt>Code: </dt><dd><code>#define RXD1_DATA         &#40;UDR1&#41;<br />unsigned char your_var;<br />SIGNAL &#40;SIG_UART1_RECV&#41;&#123;<br />    your_var =RXD1_DATA;<br />&#125;<br /></code></dd></dl><br /><br />I'm assuming your just trying to save one char. If you need more, then your var should be an array, you need another variable to define the array index you're writing to and do exactly like AX-12 communication:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>#define RXD1_DATA         &#40;UDR1&#41;<br />unsigned char your_var&#91;128&#93;;<br />unsigned int index=0;<br />SIGNAL &#40;SIG_UART1_RECV&#41;&#123;<br />    your_var&#91;index++&#93; =RXD1_DATA;<br />&#125;<br /></code></dd></dl><br /><br />Don't forget to restart your index variable when you're done reading! Save all the memory you can  <img src="http://forum.robosavvy.com/images/smilies/icon_wink.gif" alt=":wink:" title="Wink" /><br /><br />EDIT: you also need to enable the Interrupt bit for the PC USART. If you're using the example.c code, you should see <dl class="codebox"><dt>Code: </dt><dd><code>cbi&#40;UCSR1B,7&#41;; // RxD interrupt disable</code></dd></dl><br />You need to change this to sbi(UCSR1B,7).[/code]<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1097">clusher</a> — Wed Aug 12, 2009 2:44 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[zildjiansam]]></name></author>
<updated>2009-08-10T18:51:13+01:00</updated>
<published>2009-08-10T18:51:13+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=3802&amp;p=21238#p21238</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=3802&amp;p=21238#p21238"/>
<title type="html"><![CDATA[Problems with a program!]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=3802&amp;p=21238#p21238"><![CDATA[
Hello everybody!, I have a problem, i'm doing a program to move differents dinamyxels. I don't know how to get values in a variable by my program!. I mean, i wanna write a value in the robot terminal and save it in a variable in my C program in the win avr, I need your help!.<br /> There are lots of examples in the manuals, but anyone explain how to save a value of the robot terminal in a variable in my program.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1412">zildjiansam</a> — Mon Aug 10, 2009 6:51 pm</p><hr />
]]></content>
</entry>
</feed>