Home/Support/Support Forum/XBee Pro S3B/XSC problems using UART with microcontroller (AT90CAN64)

XBee Pro S3B/XSC problems using UART with microcontroller (AT90CAN64)

0 votes
I have two Pro XBee Pro S3B, one is connected to my computer through USB, meanwhile the other is connected to a microcontroller AT90CAN64.

Here are the settings for each XBee, which I configured using XCTU:

- A (coordinator)
CE: Indirect Msg Coordinator [1]
ID: 71FF
SH: 13A200
DH: 13A200
DL: 418CCAB4

- B (router)
CE: Standard Router [0]
ID: 71FF
SH: 13A200
SL: 418CCAB4

I have both in Transparent Mode.

If I connect both A and B in my computer, if I use the XCTU terminal, I am able to exchange messages between them.

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.

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?

Below you find the code running in the microcontroller:

#ifndef __cplusplus
#define __cplusplus

#ifndef F_CPU
#define F_CPU 16000000

#include <avr/io.h>
#include <util/delay.h>
#include "usart.h"

void sendTest(void);

void sendTest(){

int main(){

DDRG |= (1 << PG0)|(1 << PG1)|(1 << PG2)|(1<<PG3); //Make pins PG[0...3] output.
PORTG |= (1 << PG0)|(1 << PG1)|(1 << PG2)|(1<<PG3); //Turn all LEDs off

PORTG &= ~(1<<PG0); //Turn red LED on
PORTG |= (1<<PG0); //Turn red LED off
while (1){

PORTG &= ~(1<<PG0); //Turn red LED on
PORTG |= (1<<PG0); //Turn red LED off
asked Jan 23 in RF Solutions and XBee by Ricardo Silveira New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
You are holding the DI line low on the XBee which is putting it into command mode. Try adjusting your code or adding an external pull up resistor on the line.
answered Jan 28 by mvut Veteran of the Digi Community (12,786 points)
I am not very familiar with hardware, so if you can help me out a bit, what are the characteristics of the pull up resistor? And where to I add it? To DI?
A pull up resistor is a small resistor that is placed between two points that allows the voltage to be pulled to a high state. You generally would place it between your data out and the XBee modules data in.