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

how to receive data from two slave using Zigbee???

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



Joined: 26 Apr 2012
Posts: 13

View user's profile Send private message

how to receive data from two slave using Zigbee???
PostPosted: Thu May 17, 2012 9:19 am     Reply with quote

I've successfully received adc data from a slave. Now, I want to receive adc data from two slaves. Can anyone help me???
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu May 17, 2012 2:59 pm     Reply with quote

Farazwan, you're a fountain of information but we are not mind readers. If
this is related to a post you made earlier you should add to that. If not then
give us something to go on like what you have right now both H/W and
software and maybe some code?
_________________
Google and Forum Search are some of your best tools!!!!
farazwan



Joined: 26 Apr 2012
Posts: 13

View user's profile Send private message

PostPosted: Fri May 18, 2012 1:41 am     Reply with quote

bnh

Last edited by farazwan on Sun May 20, 2012 11:04 am; edited 1 time in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19545

View user's profile Send private message

PostPosted: Fri May 18, 2012 8:54 am     Reply with quote

From what I'm 'guessing'. you probably can't....

You need to understand the difference between a 'simplex' link, a 'half-duplex' link, and a 'duplex' link. It sounds as if you have the first. A single 'transmitter' module on one device, and a receiver on the other. You are asking how to have multiple transmitters all send messages to the single receiver?. This is like having one person standing in a crowd, while several other people (who have their own ears blocked), try to shout messages at him. Unless one happens to 'strike lucky', and shout at exactly the moment when everyone else is silent, none of the messages will get through. This is a 'simplex' link - only one direction possible.
Now, there is a strategy, that _can_ possibly allow this to sort of work. What you have is one transmitter send messages (with an ID attached to say who they are from, and a 'checksum'), at intervals of (say) 1 second. Then the second transmitter sends messages at a fractionally different interval - perhaps 1.01 seconds. Keep the messages short, so the gaps between are long. Then the receiver looks for a message with a good checksum (this way if two messages are sent at the same time, both will be rejected), and works out who each message is from. If two messages 'clash', because the interval between is not the same, they will get corrupted, and the checksum will fail. However the next pair of messages will 'miss' one another, because the timings are different. A 'brute force' solution, but one that can work reliably, provided missing one message doesn't matter.

If messages 'matter', then a more complex solution is needed. This is where you switch to 'half duplex'. Here the people in the previous analogy, don't have their ears covered (so you current transmitting device, would have a receiver as well), and the man wanting the messages, 'asks' for them. He shouts 'one', and the first 'slave' responds with it's message. He then shouts 'two' and the second slave responds. Here messages can go in both directions, but only one way at a time. This is called 'half-duplex' (two way transmission but only one way at a time). With this you can also have 'hand along' as a strategy - here the master says 'anyone there', and the first 'slave' responds, but when it finishes adds at the end of the message, the header to tell the _next_ slave to now respond.

The third solution is 'full duplex'. You have a second radio link, using a different frequency (so data can be sent both ways at the same time). This is fine for wires, but gets expensive on frequencies for radio. However the requests can then be much faster.

Best Wishes
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