Communication between laptop and atmega2560 via two Xbee S2C

I want to send data to atmega 2560 from my laptop using two Xbee S2C.

  • The first Xbee , let’s label it A , is to be interfaced with the laptop.
  • The second Xbee , let’s label it B , is to be interfaced with the atmega 2560.

I want to know how to configure these Xbees to communicate with each other.
I am a beginner , I know only few things :

  • The Xbee A will be interfaced with the laptop using Xbee usb adapter , which will facilitate the UART communication between Laptop and Xbee A.
  • The Xbee B will be interfaced with the Atmega2560 by providing Xbee B with power and connecting Tx and Rx of the micro controller to that of Xbee B.These two will then communicate via UART.

I am also not clear that the controller’s Tx and Rx pin will connect to Xbee B’s Tx and Rx pin respectively or the other way around. Please guide.

Take a look at|Serial%2520interface|UART%2520data%2520flow|_____0
That should answer your question.

Suggest using the 802.15.4 versions of the XBee. There default configuration is Peer to peer at 9600 baud.

1 Like