title: XBee Pro S3B/XSC problems using UART with microcontroller (AT90CAN64)
body: <p>I have two Pro XBee Pro S3B, one is connected to my computer through USB, meanwhile the other is connected to a microcontroller AT90CAN64.</p>
  
  <p>Here are the settings for each XBee, which I configured using XCTU:</p>
  
  <pre><code>- A (coordinator)
  CE: Indirect Msg Coordinator [1]
  ID: 71FF
  SH: 13A200
  SL: 418CCABF
  DH: 13A200
  DL: 418CCAB4
  
  - B (router)
  CE: Standard Router [0]
  ID: 71FF
  SH: 13A200
  SL: 418CCAB4
  DL: 418CCABF
  </code></pre>
  
  <p>I have both in Transparent Mode.</p>
  
  <p>If I connect both A and B in my computer, if I use the XCTU terminal, I am able to exchange messages between them.</p>
  
  <p>My main issue is the following: after I turn on the AT90CAN64, if I connect DIN/DOUT (XBee) to TX/RX (AT90CAN64), load the XCTU and try to exchange messages, I am not successful. However, if I do not connect TX/RX - DIN/DOUT, wait some time, then I connect TX/RX - DIN/DOUT, and then load XCTU, I am able to exchange messages.</p>
  
  <p>I have looked in the documentation and forums and nothing touches this problem. Has any one any idea of what may be the issue or any clue on how to tackle it?</p>
  
  <p>Below you find the code running in the microcontroller:</p>
  
  <pre><code>#ifndef __cplusplus
      #define __cplusplus
  #endif
  
  #ifndef F_CPU
      #define F_CPU 16000000
  #endif
  
  #include &lt;avr/io.h&gt;
  #include &lt;util/delay.h&gt;
  #include "usart.h"
  
  void sendTest(void);
  
  void sendTest(){
      USART0_Transmit8(0x07);
  }
  
  
  int main(){
  
  
      DDRG |= (1 &lt;&lt; PG0)|(1 &lt;&lt; PG1)|(1 &lt;&lt; PG2)|(1&lt;&lt;PG3);   //Make pins PG[0...3] output.
      PORTG |= (1 &lt;&lt; PG0)|(1 &lt;&lt; PG1)|(1 &lt;&lt; PG2)|(1&lt;&lt;PG3);  //Turn all LEDs off
  
  
      PORTG &amp;= ~(1&lt;&lt;PG0); //Turn red LED on
      _delay_ms(30000);
      PORTG |= (1&lt;&lt;PG0); //Turn red LED off
      USART0_Init8(103);
      while (1){
  
          //test1echo();
          PORTG &amp;= ~(1&lt;&lt;PG0); //Turn red LED on
          sendTest();
          _delay_ms(1000);
          PORTG |= (1&lt;&lt;PG0); //Turn red LED off
      }   
  }
  </code></pre>