Electronics > Microcontrollers

Issues with PIC and XBEE sending data



 At last XBEE communicate with each other but ....!

 I would like to know when the XBEE convey that is connected to the PIC 18F2550, the PC that is connected with another explorer XBEE a USB card, I get on the console of PC rare codes instead of what I really want to transmit.
 The two Xbee are configured at 1200 baud.

I removed the module XBEE Adpater USB card, and then connected the output of the PIC directly to the input of the USB adpater.
And still not working, I still see strange characters on the console.

I've been trying days but nothing at all,  I would appreciate your help.

explorer XBEE a USB card: http://www.ebay.es/itm/ws/eBayISAPI.dll?ViewItem&item=280845443252&ssPageName=ADME:L:OU:ES:1123

 That is if I carry this PIC to PC: (Theory)
 7 x 1 = 7
 7 x 2 = 14
 7 x 10 = 70

 The PC Console visualize this: (Practice)

 ãÿCýýCý ýŽîãÿCýýý ayyýŽîãÿCýýCý Cyy ayy ýŽîãÿCý yc

 I hope your help, Thanks.

 -------------------------------------------------- ----------
 Here the code:
 -------------------------------------------------- -----------
 Device = 18F2550
 Declare Xtal 20


 Dim x As Byte

 Hserial_TXSTA = %100000 'Asynchronous transmission mode
 HSERIAL_BAUD 1200 'Baud rate fixed
 Rsout_Pin = PORTC.6 'Data Output Pin (TX-Out))
 Rsout_Mode = 0
 Hserial_Clear = On 'Bufeer cleaned after each reception


 For x=1 To 10
 HRSOut "7 X ", Dec x, "= ", Dec x * 7 , 13
 Next x

 Goto INI


Hi,  I'm no expert but as no-one has replied to your post this might be of help.

Configuring, I found this, might be of help.

Also if the modules are setup correctly ie. same baud rate, wired up etc, then the fault is more than likely in your code or pic setup.  Your code looks to be of the high-level basic kind which should take care of the data transfer for you providing it's all setup correctly; One thing to check is if in your pic software code the xtal speed isn't the same as your real pic hardware xstal your baud rate will be wrong.

If you have access to a digital oscilloscope, send a single character like 'A' repeated in your pic code and take a look and see what the output and timing is like.

I've never used this module but I have used an ebay ttl bluetooth module.

I hope this helps.


[0] Message Index

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod