Author Topic: Issues with PIC and XBEE sending data  (Read 2654 times)

0 Members and 1 Guest are viewing this topic.

Offline montclerTopic starter

  • Contributor
  • Posts: 28
Issues with PIC and XBEE sending data
« on: May 26, 2012, 06:47:46 pm »
Hello,

 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

 ALL_DIGITAL true

 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

 INI:

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

 Goto INI
 END

THX..
 

jucole

  • Guest
Re: Issues with PIC and XBEE sending data
« Reply #1 on: June 01, 2012, 10:48:01 am »
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.
http://www.instructables.com/id/Changing-Xbee-Baud-Rates/?ALLSTEPS

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.





 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf