<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>One Master with many Slaves</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/27159/one-master-with-many-slaves</link><description> 
When I have a Master which to need to communicate with many slaves
through the RXD,TXD pins, is it possible for the slaves to
communicate with master independently. That is whenever the slave
wants to do so. The reason why I asked is if there is an</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: One Master with many Slaves</title><link>https://community.arm.com/thread/126112?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2010 06:35:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d269e493-9e7c-4081-876e-a04b2b6271e3</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
there is, basically, two methods for multiple nodes&lt;br /&gt;
a) master-slave which has &lt;b&gt;collision avoidance&lt;/b&gt; because no slave
speaks till granted permission. This is fairly simple.&lt;br /&gt;
b) multi-master which must have &lt;b&gt;collision detection&lt;/b&gt; because
there is no way to avoid two nodes starting at the same time by
&amp;#39;listening&amp;#39;. This type must have retransmit capability and random
start in case of collision.&lt;br /&gt;
I have done both, but my absolute preference is &lt;b&gt;collision
avoidance&lt;/b&gt; whenever possible.&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: One Master with many Slaves</title><link>https://community.arm.com/thread/115695?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2010 01:37:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:200e6807-ee85-4edb-82b9-34061bfcf526</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You seem to be trying to upgrade a master/slave system into
actually operating as a multi-master system.&lt;/p&gt;

&lt;p&gt;
But whenever you have multiple masters, you must have a method to
synchronize.&lt;/p&gt;

&lt;p&gt;
CAN or Ethernet for example have a system where a transmitter can
listen to the line while sending, and on a bit-by-bit basis notice a
collision and instantly stop the transmission at a later time. The
master that sent the dominant bit combination didn&amp;#39;t notice the
collision and could continue with the transfer.&lt;/p&gt;

&lt;p&gt;
A normal UART doesn&amp;#39;t have that hardware collision-detect feature
so you must implement solutions either by byte-wise protocol or by
adding extra signal lines or by polling.&lt;/p&gt;

&lt;p&gt;
The complexity can quickly increase dramatically so think twice.
The easiest solution is to either have one master poll all
slaves.&lt;/p&gt;

&lt;p&gt;
The second easiest solution is to have a token-ring system where
each device is enumerated, and where they talk in sequence -
potentially just saying &amp;quot;i&amp;#39;m done - next&amp;quot;. But a token-ring system
must handle enumeration (unless you hard-code the addresses) and it
must handle the loss of the token (transfer error or one of the units
rebooted).&lt;/p&gt;

&lt;p&gt;
Somewhere down the line comes collision-detectin solutions. They
tend to be very messy. And it is possible to produce something that
seems to work, but still fails randomly at bad times.&lt;/p&gt;

&lt;p&gt;
Don&amp;#39;t go for multi-master solutions unless you really, really have
to. It is easier to go for a solution with higher baudrate if you
need to speed up the response times in a polling or token-passing
solution. Or have each slave add a separate signal line - either
directly connected to the master or through a priority encoder - so
that slave 5 can draw attention when it needs servicing.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: One Master with many Slaves</title><link>https://community.arm.com/thread/102143?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2010 01:01:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:136761f3-807e-4f36-8420-546c2e5d73a8</guid><dc:creator>Jack Sprat</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Is it not possible that when any slave communicate with master,
it starts with a start byte and end with a stop byte which all slaves
connected to the line will also receive.This information can be used
by slaves to know whether the line is busy.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I think you may be missing the point. No slave should ever talk
unless it has been told to do so by the master. It doesn&amp;#39;t matter if
slaves see each others transmissions as the slaves should only
recognise and respond to a transmission from the master.&lt;/p&gt;

&lt;p&gt;
There needs to be sufficient information in your protocol so that
each &amp;#39;node&amp;#39; on the bus can clearly and unambiguously identify when a
message is addressed to it. A typical approach is to allocate an
&amp;#39;address&amp;#39; to each node - this need be nothing more than some
arbitrary number.&lt;/p&gt;

&lt;p&gt;
The slaves do not need to detect whether the line is busy because
they only transmit when addressed by the master, at which time the
line will automatically not be busy. If for any reason a slave may
not be in a position to respond then you will need to use a timeout
at the master end and require slaves to respond within that timeout
period.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: One Master with many Slaves</title><link>https://community.arm.com/thread/103920?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2010 23:38:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d24dd6ac-f9db-4aec-92b9-a837316d8a13</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes - that would be your &amp;quot;protocol&amp;quot;.&lt;/p&gt;

&lt;p&gt;
IF the slaves listen while they transmit, and you have a suitable
design of the &amp;quot;start byte&amp;quot;, you can use this for &lt;b&gt;collision
detection&lt;/b&gt;...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: One Master with many Slaves</title><link>https://community.arm.com/thread/78268?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2010 23:26:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:84f38899-d394-4876-b196-63289e020d2b</guid><dc:creator>Premkumar P</dc:creator><description>&lt;p&gt;&lt;p&gt;
Is it not possible that when any slave communicate with master, it
starts with a start byte and end with a stop byte which all slaves
connected to the line will also receive.This information can be used
by slaves to know whether the line is busy.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: One Master with many Slaves</title><link>https://community.arm.com/thread/65575?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2010 22:43:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:69e220c3-e46d-48e0-bfa5-bd78d4d36163</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, if multiple slaves try to communicate at the same time, there
will be conflict.&lt;/p&gt;

&lt;p&gt;
Therefore, you need to apply some kind of &lt;b&gt;Protocol&lt;/b&gt; to
ensure that this can&amp;#39;t happen.&lt;/p&gt;

&lt;p&gt;
One way is for the master to poll each slave...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>