<?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=1760" />

<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>2008-09-17T17:50:49+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=5&amp;t=1760</id>
<entry>
<author><name><![CDATA[billyzelsnack]]></name></author>
<updated>2008-09-17T17:50:49+01:00</updated>
<published>2008-09-17T17:50:49+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17566#p17566</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17566#p17566"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17566#p17566"><![CDATA[
StuartL.. Do you put a small delay in between? I wonder if those pins can still be high for a short amount time. Seems unlikely that the uC would block on that instruction waiting for it to go low. Maybe it does though or maybe it doesn't really matter.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=459">billyzelsnack</a> — Wed Sep 17, 2008 5:50 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[StuartL]]></name></author>
<updated>2008-09-17T11:11:23+01:00</updated>
<published>2008-09-17T11:11:23+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17564#p17564</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17564#p17564"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17564#p17564"><![CDATA[
<blockquote><div><cite>limor wrote:</cite><br />i didn't know that you had modules working this way. This issue was discussed before here with relation to the Pepper board and somehow I got the impression that there was some kind of electrical or signal problem with shorting the RX and TX on the Atmega.<br /></div></blockquote><br /><br />If you set both TX and RX as output (i.e. if(DDRtx &amp; _BV(TXpin) &amp;&amp; DDRrx &amp; _BV(RXpin)) then you run a severe risk of blowing up the AVR.<br /><br />We solve this problem by ensuring that the only place we modify those two bits is in the same routine and the current output is always set to zero (making it an input) before the new output is set.  This way we don't short out the PSU even for a microsecond.<br /><br />It's code discipline <img src="http://forum.robosavvy.com/images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=645">StuartL</a> — Wed Sep 17, 2008 11:11 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[StuartL]]></name></author>
<updated>2008-09-17T11:07:39+01:00</updated>
<published>2008-09-17T11:07:39+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17563#p17563</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17563#p17563"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17563#p17563"><![CDATA[
I can't help with the Arduino programming side of it but if you're using the AVR directly...<br /><br />The key things you're interested in are the DDR and PORT registers for each of the IO pins.  If your TX pin was PD4 and your RX pin was PE0 the registers you would be interested in are:<br /><br />DDRD bit 4 (data direction for TX pin)<br />PORTD bit 4 (output data for TX pin)<br /><br />and<br /><br />DDRE bit 0 (data direction for RX pin)<br />PORTE bit 0 (output data for RX pin)<br /><br />Note that this is all documented in the AVR PDFs.<br /><br />If DDRx is set to zero the pin is an input pin.  This is the default.  With the pin as an input pin the PORTx register sets the pull-up for the pin, so bit zero of the PORTE register being zero would mean no pull-up (floating pin, what you want for an input) and bit zero of the PORTE register being one would mean weak pull-up.  Pull-up is useful for shared buses but isn't really necessary for the bioloid bus.  You can enable it without consequence.<br /><br />If DDRx is set to one the pin is an output pin and the PORTx bit is used as the value for the output pin.<br /><br />In all cases you probably want the RX input to be set, although you may wish to disable the receiver so that you don't see your own transmissions.<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>cbi&#40;DDRE, 0&#41;; sbi&#40;PORTE, 0&#41;;  // Set the RX pin to input with weak pull-up.  You probably don't want pull-up on anything but the controller.<br /></code></dd></dl><br /><br /><br />And your transmit routine looks like this:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>sbi&#40;DDRD, 4&#41;; // Set DDR for Pin D4 to output.<br />UARTD0 = byte;<br />while &#40;!txcomplete&#40;&#41;&#41;;<br />cbi&#40;DDRD, 4&#41;;  cbi&#40;PORTD, 4&#41;;  // DDR for Pin D4 to input.</code></dd></dl><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=645">StuartL</a> — Wed Sep 17, 2008 11:07 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[JonHylands]]></name></author>
<updated>2008-09-17T04:22:55+01:00</updated>
<published>2008-09-17T04:22:55+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17560#p17560</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17560#p17560"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17560#p17560"><![CDATA[
No idea - the only example I have is the code my brother wrote...<br /><br />- Jon<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=373">JonHylands</a> — Wed Sep 17, 2008 4:22 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gr33nhorn]]></name></author>
<updated>2008-09-16T18:04:55+01:00</updated>
<published>2008-09-16T18:04:55+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17548#p17548</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17548#p17548"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17548#p17548"><![CDATA[
hi jon,<br />as stated from your past year reply.regarding the ATmega UART can selectively switch off the transmit and receive pins while it is operating, which is what the code my brother wrote does. In general, the Tx pin is disabled, and its in receive mode. When it needs to transmit an answer back again, it disables the Rx pin, enables the Tx, and then sends the response, and switches them back again. <br /><br />where can i learn how to change the uart code?any gd website to recommend?i really want to learn from the very basic and pick up one by one<br />thanks in advance<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1162">gr33nhorn</a> — Tue Sep 16, 2008 6:04 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[JonHylands]]></name></author>
<updated>2008-09-15T03:44:09+01:00</updated>
<published>2008-09-15T03:44:09+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17536#p17536</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17536#p17536"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17536#p17536"><![CDATA[
If you follow the instructions I posted above last year, you should be good.<br /><br />- Jon<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=373">JonHylands</a> — Mon Sep 15, 2008 3:44 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gr33nhorn]]></name></author>
<updated>2008-09-14T06:24:52+01:00</updated>
<published>2008-09-14T06:24:52+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17530#p17530</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17530#p17530"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17530#p17530"><![CDATA[
sorry for asking question  where by alot of people asked before.i bought arduino months ago and wish  to use its IDE to control ax-12.i saw a few thread but i just confuse with a few methods for connecting the rx and tx pins into ttl half dupex.hope you guys can give me some guidance<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1162">gr33nhorn</a> — Sun Sep 14, 2008 6:24 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gr33nhorn]]></name></author>
<updated>2008-09-14T06:22:05+01:00</updated>
<published>2008-09-14T06:22:05+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17529#p17529</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17529#p17529"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17529#p17529"><![CDATA[
sorry for asking question  where by alot of people asked before.i bought arduino months ago and wish  to use its IDE to control ax-12.i saw a few thread but i just confuse with a few methods for connecting the rx and tx pins into ttl half dupex.hope you guys can give me some guidance<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1162">gr33nhorn</a> — Sun Sep 14, 2008 6:22 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gr33nhorn]]></name></author>
<updated>2008-09-13T21:37:00+01:00</updated>
<published>2008-09-13T21:37:00+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17528#p17528</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17528#p17528"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=17528#p17528"><![CDATA[
hi guys,<br />i saw a thread from somewhere, some one use pnp transitor to create ttl half duplex....anyone know anything about it?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1162">gr33nhorn</a> — Sat Sep 13, 2008 9:37 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[JonHylands]]></name></author>
<updated>2007-09-21T15:07:02+01:00</updated>
<published>2007-09-21T15:07:02+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11237#p11237</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11237#p11237"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11237#p11237"><![CDATA[
You need to cross the Rx and Tx pins of the ATmega168, and use the software I pointed out to you in my first reply. Don't short the pins until you have the software loaded, because otherwise you can burn out the UART. I typically solder a molex 2-pin header to the two pins, and then put a jumper across (see pic below - the jumper is just above the bus connection)...<br /><br /><img src="http://robosavvy.com/Builders/JonHylands/SensorBoard-01-small.jpg" alt="Image" /><br /><br />Then you can modify that software so that instead of representing an IMU, it simulated an AX-12. The control table for the AX-12 is very well defined, and it should be fairly simple to do most of it. It really depends on how deep you want your simulation to be...<br /><br />- Jon<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=373">JonHylands</a> — Fri Sep 21, 2007 3:07 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[alonsoBrain]]></name></author>
<updated>2007-09-21T14:45:18+01:00</updated>
<published>2007-09-21T14:45:18+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11234#p11234</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11234#p11234"/>
<title type="html"><![CDATA[Re: Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11234#p11234"><![CDATA[
<blockquote><div><cite>alonsoBrain wrote:</cite><br />Hi!<br /><br />Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?<br />(assign ID, read the CM5 signals, write in the bus...)<br /></div></blockquote><br /><br />I think I'm loosing<br /><br />... so... do i need any aditional hardware to conect both devices...?<br /><br />thanks for your patience....<br /><br />aB<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=314">alonsoBrain</a> — Fri Sep 21, 2007 2:45 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[alonsoBrain]]></name></author>
<updated>2007-09-21T14:44:31+01:00</updated>
<published>2007-09-21T14:44:31+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11233#p11233</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11233#p11233"/>
<title type="html"><![CDATA[Re: Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11233#p11233"><![CDATA[
<blockquote><div><cite>alonsoBrain wrote:</cite><br />Hi!<br /><br />Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?<br />(assign ID, read the CM5 signals, write in the bus...)<br /></div></blockquote><br /><br />I think I'm loosing<br /><br />... so... do i need any aditional hardware to conect both devices...?<br /><br />thanks for your patience....<br /><br />aB<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=314">alonsoBrain</a> — Fri Sep 21, 2007 2:44 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[JonHylands]]></name></author>
<updated>2007-09-21T12:28:29+01:00</updated>
<published>2007-09-21T12:28:29+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11231#p11231</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11231#p11231"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11231#p11231"><![CDATA[
Yeah, as long as you have either an 8Mhz or 16Mhz crystal/oscillator, or use the built-in 8MHz one, you can do this.<br /><br />- Jon<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=373">JonHylands</a> — Fri Sep 21, 2007 12:28 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[limor]]></name></author>
<updated>2007-09-21T08:36:20+01:00</updated>
<published>2007-09-21T08:36:20+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11222#p11222</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11222#p11222"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11222#p11222"><![CDATA[
i didn't know that you had modules working this way. This issue was discussed before here with relation to the Pepper board and somehow I got the impression that there was some kind of electrical or signal problem with shorting the RX and TX on the Atmega.<br /><br />But this is great news because it means that basically any Atmega controller board (with the 1mbps UART) can control the Bioloid bus.<br /><br /><br /> <img src="http://forum.robosavvy.com/images/smilies/icon_idea.gif" alt=":idea:" title="Idea" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2">limor</a> — Fri Sep 21, 2007 8:36 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[JonHylands]]></name></author>
<updated>2007-09-21T00:31:25+01:00</updated>
<published>2007-09-21T00:31:25+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11219#p11219</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11219#p11219"/>
<title type="html"><![CDATA[Dynamixel &amp; ARDUINO]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1760&amp;p=11219#p11219"><![CDATA[
No.<br /><br />I use that for my USB interface, because you need it. But the AVR can handle in software what the tristate buffer is doing in hardware.<br /><br />- Jon<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=373">JonHylands</a> — Fri Sep 21, 2007 12:31 am</p><hr />
]]></content>
</entry>
</feed>