View previous topic :: View next topic |
Author |
Message |
roby Guest
|
question about zrs232.h |
Posted: Fri Apr 27, 2007 6:43 am |
|
|
I would like to know if there is an example related to zrs232 driver and if it is possibile to use it with any zigbee rs232 module because I need to interface (send and receive commands) from a Zigbee Maxstream Xbee module
Thank You |
|
![](templates/subSilver/images/spacer.gif) |
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Fri Apr 27, 2007 8:41 am |
|
|
I'm not quite sure what you're asking.
I looked through the examples and drivers and didn't see anything related to Zigbee. If you are using the Maxstream XBee module, they have Zigbee firmware that can be flashed to the modules. I'm not sure of the current state of the firmware, but I think I recall that it is up and running.
If you are trying to merely communicate using the XBee then that is fairly simple and the serial samples will show you the way. If you would like to put the XBee in command mode and change the configuration while in your application, that will take some more work (probably not too much).
So. Do you just need to tx and rx through the XBee or do you really need to send and receive 'commands' between your app and the XBee?
John |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Fri Apr 27, 2007 9:42 am |
|
|
Thank you for your answer.
I need that a pic can send and receive commands(=data) wireless to another pic using two Xbee modules and so I need to write a code to do that. I'm looking for some examples because I do not know where to begin |
|
![](templates/subSilver/images/spacer.gif) |
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Fri Apr 27, 2007 11:19 am |
|
|
That should be easy. Look at the ex_sisr.c file in the examples folder. That will give you the basics of serial communications. The XBee radios function like a serial cable if they are both programmed the same.
Don't worry about the Zigbee stuff yet. Just get the serial working first.
John |
|
![](templates/subSilver/images/spacer.gif) |
roby Guest
|
about zigbee |
Posted: Fri Apr 27, 2007 11:50 am |
|
|
Only another question: suppose serial communications is ok. I need to realize at commands and at replies and this is not comfortable but ok, but I can't understand how zigbee send to uart my data that is to say if my data is linked to a command or other things, how can I work with my data?
Thank You |
|
![](templates/subSilver/images/spacer.gif) |
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Fri Apr 27, 2007 12:56 pm |
|
|
This will be a two step process.
First - Get basic serial communications between two XBee radios working. Don't worry that it is an XBee radio that you are communicating through, it will appear just as though you had a RS232 connection. Put byte X into XBee one and byte X will appear on all XBees within range and configured the same.
Second - Read the Maxstream manual regarding their implementation of Zigbee.
What stage are you at right now? Do you have hardware to play with? Are you trying to design a board? Etc....
John |
|
![](templates/subSilver/images/spacer.gif) |
roby Guest
|
|
Posted: Fri Apr 27, 2007 1:23 pm |
|
|
I use a bread boards for now.
I have read Xbee manual but as it is the first time I use it I'm a bit confuse
If I have understood I send at commands to initialize Xbee then I need only to send a data byte to uart to obtain that data byte out from the second Xbee. A very simply thing |
|
![](templates/subSilver/images/spacer.gif) |
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Fri Apr 27, 2007 1:28 pm |
|
|
Even simpler than that.
If you've ordered radios and have two of them. They are both programmed with the the default configuration. Power them up, put data on the Din pin#3 of the first radio, and it will appear on the Dout pin#2 of the second radio (or any other radio within range).
S I M P L E. (the way I like it....)
Remember they are not 5V radios.
John |
|
![](templates/subSilver/images/spacer.gif) |
roby Guest
|
|
Posted: Fri Apr 27, 2007 1:31 pm |
|
|
Yes, I have seen that I need a voltage translator.
Again thank you |
|
![](templates/subSilver/images/spacer.gif) |
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Fri Apr 27, 2007 1:41 pm |
|
|
I get by very successfully without voltage translators.
Run your PIC at 5V and your XBee at 3.3V. Use a voltage divider for anything going into the XBee and just live with the XBee's 3.3V for anything going to the PIC. Just be careful, use the hardware USART and it won't have a problem with 3.3V logic high. If you bit bang on a pin that isn't TTL then you'll have problems with 3.3V logic.
John |
|
![](templates/subSilver/images/spacer.gif) |
|