CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

question about zrs232.h

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
roby
Guest







question about zrs232.h
PostPosted: Fri Apr 27, 2007 6:43 am     Reply with quote

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
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Fri Apr 27, 2007 8:41 am     Reply with quote

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
Guest








PostPosted: Fri Apr 27, 2007 9:42 am     Reply with quote

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
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Fri Apr 27, 2007 11:19 am     Reply with quote

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
roby
Guest







about zigbee
PostPosted: Fri Apr 27, 2007 11:50 am     Reply with quote

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
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Fri Apr 27, 2007 12:56 pm     Reply with quote

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
roby
Guest







PostPosted: Fri Apr 27, 2007 1:23 pm     Reply with quote

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
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Fri Apr 27, 2007 1:28 pm     Reply with quote

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
roby
Guest







PostPosted: Fri Apr 27, 2007 1:31 pm     Reply with quote

Yes, I have seen that I need a voltage translator.

Again thank you
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Fri Apr 27, 2007 1:41 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group