What do you mean "their signal won't crash"? Unless both slaves are transmitting the exact same data at the exact same time, you are going to have collisions (not "crashes")
- - - Updated - - -
What do you mean "their signal won't crash"? Unless both slaves are transmitting the exact same data at the exact same time, you are going to have collisions (not "crashes")
How do you KNOW both slaves are transmitting?
What do you mean by same level and different level? How do you achieve different level?You WANT to make them collide? Okay.....
You've got two outputs connected together. If they both put out the same level then the there's no problem, it's only when each output is trying to supply a different level that you'll have a problem.
Same data sending at the same time will hv no collision? Wow.. I didn't know that.If the two slaves work in unison and return the same data at the same time there is no 'collision', you just have twice as much drive on the lines. The data corruption occurs when one driver transmits a high while the other transmits a low. Instead of the line voltage following logic levels, one driver simply pushes current into the other and both get hot with the line voltage depending on which pushes hardest.
If you want to simulate a collision try sending different data or tieing one of the drivers so it is always in transmit mode.
Brian.
How am I going to make it send different data?
I can understand two slaves having the same code in them - except for their addresses. There is no point in having two identical units doing identical jobs simultaneously. They may do the same job at different times, that's why they have addresses in the first place.
If you are trying to avoid a human error of manually setting two devices to the same address, you can do it by listening to see if another device has replied before enabling the transmitter. You will have to employ a random timing algorithm before sending so to ensure the two (or more) units don't wait for the same time and then reply together again.
Brian.
Have them send different messages!!!! Why don't you listen to what people are telling you???
do as I suggested and make the addressed unit listen to see if any other unit has replied before sending it's own message.
Thanks for the suggestion.Two units with the same address, same data and SENDING SIMULTANEOUSLY cannot be detected by a collsion mechanism. Obviously it isn't a situation that should ever happen but if you want to guard against human error, do as I suggested and make the addressed unit listen to see if any other unit has replied before sending it's own message.
The other way to do it is to serialize the message, at start up you create a random number and you send it as a 'message counter' embedded in the data and add a CRC byte at the end. After each message you increment the count. It is very unlikely that two units will have the same random seed so their counts will be out of step and their CRCs different. Even if the unit addresses are the same, their message contents wil be different and the corruption can be detected. You don't have to use the count itself unless you want to double check it is sequential from each unit, it's purpose is just to ensure uniqueness of the message.
Brian.
Brian.
That's not going to work. The assumption is that both slaves are identical in every respect. Thus, they both wait the exact same amount of time, then they both start transmitting the exact same message at the exact same instant.
Do you hv any suggestion on how to make the data collide for my case?
what exactly do you expect to see during a collision ??
Its very likely the output data after collision is a mixture of the data from the two slave units...
what exactly do you expect to see during a collision ??
Its very likely the output data after collision is a mixture of the data from the two slave units...
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?