<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Playing Xbee. Part 1 &#8211; First impression.</title>
	<atom:link href="http://www.circuitsathome.com/mcu/programming/playing-xbee/feed" rel="self" type="application/rss+xml" />
	<link>http://www.circuitsathome.com/mcu/programming/playing-xbee</link>
	<description>A Solder Joint</description>
	<lastBuildDate>Wed, 28 Jul 2010 22:29:35 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: oleg</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-5903</link>
		<dc:creator>oleg</dc:creator>
		<pubDate>Sat, 08 May 2010 20:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-5903</guid>
		<description>I believe that wouldn&#039;t work.</description>
		<content:encoded><![CDATA[<p>I believe that wouldn&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mat</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-5901</link>
		<dc:creator>mat</dc:creator>
		<pubDate>Sat, 08 May 2010 14:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-5901</guid>
		<description>Hi, i&#039;m new to xbee and i just want to know if i can connect analog voltages directly to the analog pins of the transmit xbee (without using the USART pins) and expect the voltages to show up in the receive xbee?</description>
		<content:encoded><![CDATA[<p>Hi, i&#8217;m new to xbee and i just want to know if i can connect analog voltages directly to the analog pins of the transmit xbee (without using the USART pins) and expect the voltages to show up in the receive xbee?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suna</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-5881</link>
		<dc:creator>suna</dc:creator>
		<pubDate>Fri, 30 Apr 2010 09:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-5881</guid>
		<description>Hi everyone. V r doin 8th sem proj usin zigbee series 2. V configured one as co ordinator n other as end device. Wit dh dl and sh sl interchanged. Nw how to find out transmission???</description>
		<content:encoded><![CDATA[<p>Hi everyone. V r doin 8th sem proj usin zigbee series 2. V configured one as co ordinator n other as end device. Wit dh dl and sh sl interchanged. Nw how to find out transmission???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sachitha</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-4088</link>
		<dc:creator>Sachitha</dc:creator>
		<pubDate>Sun, 07 Feb 2010 16:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-4088</guid>
		<description>I&#039;m planning to use xbee for a prototype sensor network with 5-6 nodes (with a pic 18F452). I want to be able to program a wireless routing protocol (simplified AODV or DSR) on the PIC to run on xbee. Is this possible?</description>
		<content:encoded><![CDATA[<p>I&#8217;m planning to use xbee for a prototype sensor network with 5-6 nodes (with a pic 18F452). I want to be able to program a wireless routing protocol (simplified AODV or DSR) on the PIC to run on xbee. Is this possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oleg</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-3953</link>
		<dc:creator>oleg</dc:creator>
		<pubDate>Fri, 22 Jan 2010 23:40:28 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-3953</guid>
		<description>Your UZ2400 is connected to the PIC via SPI, correct? Have you been able to verify that SPI works correctly without errors - I&#039;ve seen errors on 26k20 when SPI is clocked too fast.</description>
		<content:encoded><![CDATA[<p>Your UZ2400 is connected to the PIC via SPI, correct? Have you been able to verify that SPI works correctly without errors &#8211; I&#8217;ve seen errors on 26k20 when SPI is clocked too fast.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Holger</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-3935</link>
		<dc:creator>Holger</dc:creator>
		<pubDate>Fri, 22 Jan 2010 17:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-3935</guid>
		<description>Hello,
I&#039;m trying to use the module zigbee UZ2400 of UBEC with pic18f26k20. The is a problem with the communication and no signal is going out. Can you help me with this?
Thanks in advance
Holger</description>
		<content:encoded><![CDATA[<p>Hello,<br />
I&#8217;m trying to use the module zigbee UZ2400 of UBEC with pic18f26k20. The is a problem with the communication and no signal is going out. Can you help me with this?<br />
Thanks in advance<br />
Holger</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sasha</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-3855</link>
		<dc:creator>sasha</dc:creator>
		<pubDate>Mon, 18 Jan 2010 11:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-3855</guid>
		<description>guy&#039;s can u help me in preparing code for transmitting some binary sequence</description>
		<content:encoded><![CDATA[<p>guy&#8217;s can u help me in preparing code for transmitting some binary sequence</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: natanel</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-3823</link>
		<dc:creator>natanel</dc:creator>
		<pubDate>Sun, 10 Jan 2010 11:55:53 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-3823</guid>
		<description>Ok I think I solved some xbee problem attaching it to atmel avr32
what do you think?
number 3 is relevant but I wrote it all so other may use the implemantaion

1) there is a problem in atmel mcu using usart and RTS. follow this 


Quote:
Do not use the hardware handshaking mode of the USART. 
If it is necessary to drive the RTS output high 
when the Peripheral DMA receive buffer becomes full, 
use the normal mode of the USART. 
Configure the Peripheral DMA Controller 
to signal an interrupt when the receive buffer is full. 
In the interrupt handler code, 
write a one to the RTSDIS bit in the USART Control Register (CR). 
This will drive the RTS output high. 
After the next DMA transfer is started and a receive buffer is available, 
write a one to the RTSEN bit in the USART CR so that RTS will be driven low. 

remmber to pdca_disable_interrupt_transfer_complete/pdca_enable_interrupt_transfer_complete as needed. 

2) in XBEE, mcu RTS-&gt; xbee RTS and mcu CTS-&gt; xbee CTS 

3) there is also a problem in XBEE RTS (this was the hard one), after RTS is set there is an over head of 6 byte that will pass (if they where in XBEE RX buffer) 
so add &quot;overhead&quot; byte to each transmition 
in matlab code 

s = serial(port,&#039;BaudRate&#039;,baudrate,&#039;DataBits&#039;,dataBits,&#039;Parity&#039;,parity,&#039;StopBits&#039;,stopbits); 
data=[ &#039;some data&#039;]; 
overhead=[ 0 1 2 3 4 5]; 

% open serial 
fopen(s); 
fwrite(s,[ data overhead 1 2 3 4 overhead 5 6 overhead] ,&#039;uint8&#039;); 
fclose(s); 

this will do the trick 

4) as overhead is needed, the MCU RXCHR register will be full 
remmber to empty it before next pdca buffer reloading. 
if not the last overhead byte will be read 

if (usart_test_hit(TEMP_USART)) 
junk=(TEMP_USART-&gt;rhr &amp; AVR32_USART_RHR_RXCHR_MASK) &gt;&gt; AVR32_USART_RHR_RXCHR_OFFSET; 

5) this is my interupt function 

/*! \USART brief RTS setting 
*/ 
#if __GNUC__ 
__attribute__((naked)) 
#elif __ICCAVR32__ 
#pragma shadow_registers = full // Naked. 
#endif 
static void pdca_RTS_int_handler( void) 
{ 
/* This ISR can cause a context switch, so the first statement must be a 
call to the portENTER_SWITCHING_ISR() macro. This must be BEFORE any 
variable declarations. */ 
portENTER_SWITCHING_ISR(); 

// prevent re-entering 
pdca_disable_interrupt_transfer_complete( PDCA_CHANNEL_RX); 

// close !(RTS), stop transfer 
TEMP_USART-&gt;cr = AVR32_USART_CR_RTSDIS_MASK; 

portEXIT_SWITCHING_ISR(); 
#endif 
} 

6) this is my reading code 

// clean last overhead 
if (usart_test_hit(TEMP_USART)) 
junk=(ZIGBEE_USART-&gt;rhr &amp; AVR32_USART_RHR_RXCHR_MASK) &gt;&gt; AVR32_USART_RHR_RXCHR_OFFSET; 
// load channel 
pdca_reload_channel( PDCA_CHANNEL_RX, (void *) psParametersShadow, sizeof(xParameters)); 

// Enable PDCA transfer interrupt when completed 
pdca_enable_interrupt_transfer_complete( PDCA_CHANNEL_RX); 

//set !(RTS), start transfer 
TEMP_USART-&gt;cr = AVR32_USART_CR_RTSEN_MASK; 

// wait read end 
while(!(pdca_get_transfer_status(PDCA_CHANNEL_RX) &amp; PDCA_TRANSFER_COMPLETE)); 


hope this will help someone</description>
		<content:encoded><![CDATA[<p>Ok I think I solved some xbee problem attaching it to atmel avr32<br />
what do you think?<br />
number 3 is relevant but I wrote it all so other may use the implemantaion</p>
<p>1) there is a problem in atmel mcu using usart and RTS. follow this </p>
<p>Quote:<br />
Do not use the hardware handshaking mode of the USART.<br />
If it is necessary to drive the RTS output high<br />
when the Peripheral DMA receive buffer becomes full,<br />
use the normal mode of the USART.<br />
Configure the Peripheral DMA Controller<br />
to signal an interrupt when the receive buffer is full.<br />
In the interrupt handler code,<br />
write a one to the RTSDIS bit in the USART Control Register (CR).<br />
This will drive the RTS output high.<br />
After the next DMA transfer is started and a receive buffer is available,<br />
write a one to the RTSEN bit in the USART CR so that RTS will be driven low. </p>
<p>remmber to pdca_disable_interrupt_transfer_complete/pdca_enable_interrupt_transfer_complete as needed. </p>
<p>2) in XBEE, mcu RTS-&gt; xbee RTS and mcu CTS-&gt; xbee CTS </p>
<p>3) there is also a problem in XBEE RTS (this was the hard one), after RTS is set there is an over head of 6 byte that will pass (if they where in XBEE RX buffer)<br />
so add &#8220;overhead&#8221; byte to each transmition<br />
in matlab code </p>
<p>s = serial(port,&#8217;BaudRate&#8217;,baudrate,&#8217;DataBits&#8217;,dataBits,&#8217;Parity&#8217;,parity,&#8217;StopBits&#8217;,stopbits);<br />
data=[ 'some data'];<br />
overhead=[ 0 1 2 3 4 5]; </p>
<p>% open serial<br />
fopen(s);<br />
fwrite(s,[ data overhead 1 2 3 4 overhead 5 6 overhead] ,&#8217;uint8&#8242;);<br />
fclose(s); </p>
<p>this will do the trick </p>
<p>4) as overhead is needed, the MCU RXCHR register will be full<br />
remmber to empty it before next pdca buffer reloading.<br />
if not the last overhead byte will be read </p>
<p>if (usart_test_hit(TEMP_USART))<br />
junk=(TEMP_USART-&gt;rhr &amp; AVR32_USART_RHR_RXCHR_MASK) &gt;&gt; AVR32_USART_RHR_RXCHR_OFFSET; </p>
<p>5) this is my interupt function </p>
<p>/*! \USART brief RTS setting<br />
*/<br />
#if __GNUC__<br />
__attribute__((naked))<br />
#elif __ICCAVR32__<br />
#pragma shadow_registers = full // Naked.<br />
#endif<br />
static void pdca_RTS_int_handler( void)<br />
{<br />
/* This ISR can cause a context switch, so the first statement must be a<br />
call to the portENTER_SWITCHING_ISR() macro. This must be BEFORE any<br />
variable declarations. */<br />
portENTER_SWITCHING_ISR(); </p>
<p>// prevent re-entering<br />
pdca_disable_interrupt_transfer_complete( PDCA_CHANNEL_RX); </p>
<p>// close !(RTS), stop transfer<br />
TEMP_USART-&gt;cr = AVR32_USART_CR_RTSDIS_MASK; </p>
<p>portEXIT_SWITCHING_ISR();<br />
#endif<br />
} </p>
<p>6) this is my reading code </p>
<p>// clean last overhead<br />
if (usart_test_hit(TEMP_USART))<br />
junk=(ZIGBEE_USART-&gt;rhr &amp; AVR32_USART_RHR_RXCHR_MASK) &gt;&gt; AVR32_USART_RHR_RXCHR_OFFSET;<br />
// load channel<br />
pdca_reload_channel( PDCA_CHANNEL_RX, (void *) psParametersShadow, sizeof(xParameters)); </p>
<p>// Enable PDCA transfer interrupt when completed<br />
pdca_enable_interrupt_transfer_complete( PDCA_CHANNEL_RX); </p>
<p>//set !(RTS), start transfer<br />
TEMP_USART-&gt;cr = AVR32_USART_CR_RTSEN_MASK; </p>
<p>// wait read end<br />
while(!(pdca_get_transfer_status(PDCA_CHANNEL_RX) &amp; PDCA_TRANSFER_COMPLETE)); </p>
<p>hope this will help someone</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oleg</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-3716</link>
		<dc:creator>oleg</dc:creator>
		<pubDate>Wed, 16 Dec 2009 22:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-3716</guid>
		<description>API mode may help  since in API mode Xbee is not waiting to fill the buffer - packet gets sent as soon as last byte is received from serial.</description>
		<content:encoded><![CDATA[<p>API mode may help  since in API mode Xbee is not waiting to fill the buffer &#8211; packet gets sent as soon as last byte is received from serial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hugo</title>
		<link>http://www.circuitsathome.com/mcu/programming/playing-xbee/comment-page-1#comment-3715</link>
		<dc:creator>hugo</dc:creator>
		<pubDate>Wed, 16 Dec 2009 17:08:25 +0000</pubDate>
		<guid isPermaLink="false">http://circuitsathome.com/?p=174#comment-3715</guid>
		<description>yes, it was my last try and i still have this issue. sometimes when sending about 40 bytes packet from coordinator, i have a 2/3 secs receiving delay in end point device. when sending the same 40 bytes packet from end point to coordinator i got no delay. i think it sould be a problem in addressing, because both of end points devices are using coordinator addr as DH and DL, and coordinator is using FF.

do you think that i can solve this using api mode ?

thanks,</description>
		<content:encoded><![CDATA[<p>yes, it was my last try and i still have this issue. sometimes when sending about 40 bytes packet from coordinator, i have a 2/3 secs receiving delay in end point device. when sending the same 40 bytes packet from end point to coordinator i got no delay. i think it sould be a problem in addressing, because both of end points devices are using coordinator addr as DH and DL, and coordinator is using FF.</p>
<p>do you think that i can solve this using api mode ?</p>
<p>thanks,</p>
]]></content:encoded>
	</item>
</channel>
</rss>
