How to assign address to Xbee without using starter kit?

Bluetooth, XBee, RF......

How to assign address to Xbee without using starter kit?

Postby stevenwkz89 » Sat Dec 11, 2010 2:43 pm

Hi,
Can I assign the address of the XBee module using PIC18F4550?Because I worried of data transmission crash between zigbee module as I want to do data hopping. I have 2 SKBee and 1 XBee module without starter kit.
I need 3 of them to do data hopping,so each module need address,is this correct?
As I know, we can assign address to SKBee using X-CTU software,is this statement correct?
Problem :
I planning to assign an unique address for Xbee module that without starter kit through PIC18F4550 ,but I have no idea on how to do.
Do you know the way or any code ?
Thanks.
stevenwkz89
Newbie
 
Posts: 9
Joined: Sat Dec 11, 2010 2:38 pm

Re: How to assign address to Xbee without using starter kit?

Postby yonghui » Sat Dec 11, 2010 4:04 pm

hi,

can assign the address the same way as using XCTU.
for transparent mode :
from PIC, send +++ then wait for response, then send appropriate command to change the address.... atdl, atmy etc.. follow by the address. thru UART
for API mode, refer to the user manual for the API needed.



regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: How to assign address to Xbee without using starter kit?

Postby ober » Sun Dec 12, 2010 12:52 pm

Yes, what is being send from X-CTU can be sent using microcontroller. Just follow the command in the XBee's datasheet to configure the address. All operation is using UART, Tx and Rx.

We do not have example of using microcontroller as the computer can do the work. Of course, you are welcome to share the code when you are success.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: How to assign address to Xbee without using starter kit?

Postby stevenwkz89 » Fri Dec 17, 2010 9:30 pm

Hi,
Do anyone knows how to test the XBee starter kit without using USB PC or laptop?
I tried to send something between 2 SKXBee,but i do not have idea on it.
I have an idea to test which is to send bit by bit using toggle switch or tag switch,is it possible?
The main problem is I unable to send data using TX,RX pin of SKXBee without using PIC.
Anyone have any better idea?
Thanks for your precious idea.
stevenwkz89
Newbie
 
Posts: 9
Joined: Sat Dec 11, 2010 2:38 pm

Re: How to assign address to Xbee without using starter kit?

Postby yonghui » Sat Dec 18, 2010 8:54 am

hi,
pls refer to Xbee standalone DIY project for reference without PIC communication

http://cytron.com.my/viewProduct.php?pi ... 9EIKMCZY4=



thanks&regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: How to assign address to Xbee without using starter kit?

Postby stevenwkz89 » Mon Dec 20, 2010 12:31 pm

Hi Yong Hui,
The project you asked me to refer to is without the starter kit.
I only have the SKXBee,and only have 5 pins.
Can I know if I directly input 1 bit(5V) to TX of the SKXBee and transmit to the the other SKXBee,then received or show the result through RX,is it possible?
Please advice.

Note: Can you teach me how to assign address to both SKXBee through PIC and XCTU?
Thanks.
stevenwkz89
Newbie
 
Posts: 9
Joined: Sat Dec 11, 2010 2:38 pm

Re: How to assign address to Xbee without using starter kit?

Postby aurora » Mon Dec 20, 2010 1:12 pm

stevenwkz89 WROTE:Hi,
Do anyone knows how to test the XBee starter kit without using USB PC or laptop?
I tried to send something between 2 SKXBee,but i do not have idea on it.
I have an idea to test which is to send bit by bit using toggle switch or tag switch,is it possible?
The main problem is I unable to send data using TX,RX pin of SKXBee without using PIC.
Anyone have any better idea?
Thanks for your precious idea.


Hi Steven,

I'm a bit confuse here. Let me repeat what I understand. You have 2 SKXBee (which is the starter kit, the one with a USB port) and like to test it. Why is it that you don't want to test it with PC? It's the easiest way to test if the module is working, or not.

To send data using SKXBee; first, you need to have a working serial comm. Then replace the cable with SKXBee. If you can't get the serial comm working, the Xbee won't do the magic you know. ;)
aurora
Discoverer
 
Posts: 126
Joined: Sun Jun 07, 2009 4:52 pm

Re: How to assign address to Xbee without using starter kit?

Postby yonghui » Mon Dec 20, 2010 1:37 pm

I have an idea to test which is to send bit by bit using toggle switch or tag switch,is it possible?
The main problem is I unable to send data using TX,RX pin of SKXBee without using PIC.


refering to ur question of sending using switch and without PIC, it will be standalone without UART communication.

for using UART, TX and RX, the bits stream must meet the baudrate, using switch to send bit by bit is not possible. uart data package consists of start bit, data and stop bit.


regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: How to assign address to Xbee without using starter kit?

Postby stevenwkz89 » Tue Dec 28, 2010 11:51 am

Hi,

I tried to send data from PC ( using X-CTU ) to my SKXBee which is connected to PIC, and try to display something on LCD display. Unfortunately, it does not show anything when i type something on Terminal. Below is my receiver code. I used CCS and PIC18F4550.

This is the receiver code on the PIC.
#include "main.h"
#include "LCD.c"

void main()
{
unsigned char index, input;

setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
//Setup_Oscillator parameter not selected from Intr Oscillator Config tab

// TODO: USER CODE!!
lcd_init();
lcd_gotoxy (1,1);
lcd_putc ("status");
lcd_gotoxy (1,2);
lcd_putc ("A");
lcd_putc ( "\f" );

printf ( "Starting app...\r\n" );

while(true)
{

input = getch();
printf ( "Detected [%c].\r\n", input ); // Display "Detected" when received data from
computer
continue;

//Body , This part is to send 10101010 to another zigbee module
lcd_gotoxy ( 1, 1 );
lcd_putc ( "Send: 10101010" );
putc ( 0b10101010 );

input = getch();

lcd_putc ( "Rx: " );

for ( index = 0; index < 8; ++index )
if ( input & ( 1 << ( 7 - index ) ) )
lcd_putc ( "1" );
else
lcd_putc ( "0" );

}
}

Please advice.
stevenwkz89
Newbie
 
Posts: 9
Joined: Sat Dec 11, 2010 2:38 pm

Re: How to assign address to Xbee without using starter kit?

Postby aurora » Tue Dec 28, 2010 1:35 pm

Did you manage to get 'Detected xx' on your X-CTU terminal? The LCD.c use 4-bit interface, how's your connection?

I'm also using CCS here, but I use my own LCD routine.
aurora
Discoverer
 
Posts: 126
Joined: Sun Jun 07, 2009 4:52 pm

Next

Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 8 guests

cron