Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #27447
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: What is the best communication mechanism with collision detection/avoidance for my topology? |
| Date | 2017-12-05 21:23 +0100 |
| Message-ID | <f8odigFff45U1@mid.dfncis.de> (permalink) |
| References | <73413cab-f8f3-4a23-a89d-5996fc23f917@googlegroups.com> <956d06da-01ba-47e8-be4a-479e740a61b7@googlegroups.com> |
Am 03.12.2017 um 08:06 schrieb T Obulesu:
> _____________ _____________
> | | |
> | Tx |------------|--------->| Rx |
> | | | | |
> |ATMEGA128 | | | ATMEGA8 |
> | | | | |
> | Rx |------------|------|-->| Tx |
> |____________| | | |____________|
> | |
> | | _____________
> | | | |
> | |---------->| Rx |
> | | | |
> | | | ATMEGA8 |
> | | | |
> |------|---------->| Tx |
> | | |____________|
[...]
That topology, as shown, it broken. You've connected your master Tx to
one slave Rx, but also several slave Tx'es. And vice versa. I'll
assume you really meant
+------------+ +------------+
| Tx |>------------------*---->| Rx |
| | | | |
|ATMEGA128 | | | ATMEGA8 |
| | | | |
| Rx |<-----------*------|----<| Tx |
|____________| | | +------------+
| |
| | +------------+
| *---->| Rx |
| | | |
| | | ATMEGA8 |
| | | |
*------|----<| Tx |
| | +------------+
. .
[etc.]
> Here, the atmega128 is the main controller and all other atmega8 are connected to the main controller using rs485 cable.
The type of cable is much less relevant than you probably think. The
real question is what kind of line interfaces (a.k.a. transceivers)
you're using on those lines. Let's assume they're RS485 transceivers.
> What is the best communication protocol for this to detect and avoid collision.?
None, because with this kind of topology, there really shouldn't be any
collisions in the first place, so nothing to detect or avoid. You have
a master controller, so how about letting it actually be the controlling
master of the bus?
The topology you described practically begs for a query-response
protocol: master tells all slaves who is to talk next, and optionally
what it's to talk about. The addressed device (master itself, or one
slave) then talks; all others only listen. Repeat until the cows come home.
Collisions are what you get if there's not one master, but many of them.
That's when you really need collision mitigation techniques. If
that's where you really want to go, fell free to google CSMA/CA and
CSMA/CR and the protocols mentioned in connection with those. One good
choice might then be CAN --- and it would save you half the wiring, too.
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the best communication mechanism with collision detection/avoidance for my topology? obulesu.t@gmail.com - 2017-12-02 23:05 -0800
Re: What is the best communication mechanism with collision detection/avoidance for my topology? T Obulesu <obulesu.t@gmail.com> - 2017-12-02 23:06 -0800
Re: What is the best communication mechanism with collision detection/avoidance for my topology? Robert Wessel <robertwessel2@yahoo.com> - 2017-12-03 09:03 -0600
Re: What is the best communication mechanism with collision detection/avoidance for my topology? pozz <pozzugno@gmail.com> - 2017-12-04 11:57 +0100
Re: What is the best communication mechanism with collision detection/avoidance for my topology? Jack <jack4747@gmail.com> - 2017-12-04 03:11 -0800
Re: What is the best communication mechanism with collision detection/avoidance for my topology? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2017-12-05 21:23 +0100
Re: What is the best communication mechanism with collision detection/avoidance for my topology? upsidedown@downunder.com - 2017-12-06 11:14 +0200
Re: What is the best communication mechanism with collision detection/avoidance for my topology? Dave Nadler <drn@nadler.com> - 2017-12-07 05:09 -0800
csiph-web