Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 16:08 04 Dec 2022 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Multi-drop TTL

     Page 1 of 4    
Author Message
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1527
Posted: 10:56am 12 Mar 2022
Copy link to clipboard 
Print this post

The RS485 thread just reminded to ask if anyone has tried this (short-range) method:






Craig
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 3139
Posted: 11:03am 12 Mar 2022
Copy link to clipboard 
Print this post

Hmmm... I2C with more complication.  ;)

No, not tried it. It's something I've considered many times in the past though. I seem to remember someone trying something like this many moons ago, using Nascom computers at the user group, but whether they got it to work I don't know. Can't see any obvious reason why it shouldn't.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Kabron

Regular Member

Joined: 30/11/2017
Location: Germany
Posts: 64
Posted: 11:12am 12 Mar 2022
Copy link to clipboard 
Print this post

This solution works perfect in my many projects.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1855
Posted: 11:27am 12 Mar 2022
Copy link to clipboard 
Print this post

electrically it looks good to me, if it wasn't so cold, I'd nip out to the shed and set up a few MM170s to play.

Depending on the expected baudrate, the pull up might need to be something more aggressive like 4K7 or even 3K0 to get reasonable rise times from the slaves.

You would need to establish some protocol as to who can talk, and how to encapsulate the data etc. a very similar requirement I did for a wireless HC-12 based star network. The master initiates all communication, everything has an address - master is 000, slaves are 001 - 998 and 999 is the broadcast address. Slaves only speak when spoken-to but once started they can send as many packets as they like. Here's a tiddly vid of the above protocol in action with various MMs talking with a PC master.

The above said, I think Grogs has a similar case where anything can talk and collisions are just arbitrated by the software.

interesting topic

h
Edited 2022-03-12 21:30 by CaptainBoing
 
Kabron

Regular Member

Joined: 30/11/2017
Location: Germany
Posts: 64
Posted: 11:51am 12 Mar 2022
Copy link to clipboard 
Print this post

For high speed communications it also could be done with AND-gates.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1527
Posted: 12:37pm 12 Mar 2022
Copy link to clipboard 
Print this post

  Kabron said  For high speed communications it also could be done with AND-gates.


 

What would be considered high speed?

How would the AND gate solution be configured?

@Mixtel90

I confess to not having studied the I2C approach. Is it possible to broadcast to multiple slaves or do they need to be individually addressed?


Craig
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1527
Posted: 12:56pm 12 Mar 2022
Copy link to clipboard 
Print this post

@CaptainBoing

Did you try pushing the HC-12s at a higher Baud? I realise that your application doesn't require it, just curious about the reliability.



Regards,

Craig
 
Kabron

Regular Member

Joined: 30/11/2017
Location: Germany
Posts: 64
Posted: 01:56pm 12 Mar 2022
Copy link to clipboard 
Print this post

  Tinine said  
  Kabron said  For high speed communications it also could be done with AND-gates.


 

What would be considered high speed?

How would the AND gate solution be configured?

@Mixtel90

I confess to not having studied the I2C approach. Is it possible to broadcast to multiple slaves or do they need to be individually addressed?


Craig


1. Does not matter from logic, depends only from transmitter-receiver capabilities.
2. See attach.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1855
Posted: 01:59pm 12 Mar 2022
Copy link to clipboard 
Print this post

No, I played with 9600 a top limit with success so long as you didn't hammer them.

In my applications, the packets are usually small - 100 bytes is 50 bytes of payload (because of encryption) and that is a reasonable amount of data when it is tokenised because traffic is always this message, or that message (e.g. UXR = unexpected restart etc... that particular item catches barmaids giving free snooker table time to their friends LOL) so 20 or so bytes total packet size @2400 is over in a twinkle and maximizes the range through walls & floors etc.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1855
Posted: 02:18pm 12 Mar 2022
Copy link to clipboard 
Print this post

The design above for AND gating; I have taken to using this range of chips recently, single gate SOT devices. would be perfcet for each module and not wasteful of gates.

https://www.ti.com/lit/ds/symlink/sn74lvc1g08.pdf
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 3139
Posted: 03:09pm 12 Mar 2022
Copy link to clipboard 
Print this post

@Tinine
I'm afraid I don't know much about I2c (yet). :) I know you can have multiple devices on individual addresses. I suppose you could have multiple devices *listening* on the same address, but not transmitting on it as that can mean taking bus control.

If you want distance, though, RS485/RS422 is definitely the way to go. If you want local (i.e. on a single pcb) comms at high speed then serial SPI is probably the best.

That AND gate approach would soon run into trouble with 20 devices. U1C would need 20 inputs. That's a horrendous amount of gating. :)  In theory the wired OR gate that Tinine posted originally can have any number of devices. It might be better to use an active current source instead of a pull-up resistor though.
Edited 2022-03-13 01:14 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1527
Posted: 03:39pm 12 Mar 2022
Copy link to clipboard 
Print this post

I'm liking the AND-gate approach  



Craig
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1527
Posted: 04:31pm 12 Mar 2022
Copy link to clipboard 
Print this post

@Mixtel90

Yeah I actually run a 4-wire, full duplex (485/422) network for my distributed stuff but what I am looking at right now is 4-Picos as smart I/O expanders but these slaves will be in very close proximity to the master. Seems a bit ridiculous to use differential transceivers. I already have the protocol developed so no need to futz with I2C.

Although my protocol is strictly command response, I like the full duplex approach because the master always has control of the TX and the RX is a shared response line. Should a slave get its knickers in a twist, the master is still able to talk to the other slaves, maybe to shut them down in an orderly fashion or whatever.

 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1120
Posted: 07:17pm 12 Mar 2022
Copy link to clipboard 
Print this post

It would be nice if the Tx pin could be set to OC and the Rx pins set to Pullup. The scheme would then work without any additional components. The manual doesn't mention those options for serial communications though.

Bill
Keep safe. Live long and prosper.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 3139
Posted: 08:26pm 12 Mar 2022
Copy link to clipboard 
Print this post

... and you'd be back to wired OR. :)

I can't understand why the AND gates would be considered better than the wired OR system. That only needs a single resistor (although I'd prefer a CC source) for the network and a diode per node. It's cheaper and simpler than any AND gate you can get. Cable capacitance is non-existent on short runs so the OR system won't be that slow. All the AND gates are doing is interlocking the TX/RX (unsuccessfully because it's on a bit by bit basis, not byte by byte) - and that's better done in software, controlled by the master.

For a network of n nodes every AND gate needs n inputs. It very quickly gets out of hand. Fine for just a couple of nodes, but the wiring alone (a bus of n+1 wires) makes it unsuitable for any distance.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1417
Posted: 08:31pm 12 Mar 2022
Copy link to clipboard 
Print this post

I've used an open collector setup. The nearest commercial version is called LIN. LIN has a signaling method that I feel to be unnecessary involving a break condition that cant be made by a UART. My version, then, is basically LIN hardware with regular UART signaling.

https://en.wikipedia.org/wiki/Local_Interconnect_Network
Micromites and Maximites! - Beginning Maximite
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 141
Posted: 08:37pm 12 Mar 2022
Copy link to clipboard 
Print this post

  Mixtel90 said  @Tinine

If you want distance, though, RS485/RS422 is definitely the way to go. If you want local (i.e. on a single pcb) comms at high speed then serial SPI is probably the best.



This obviously depends upon how distant is distant... I2C bus extenders such as the Texas Instruments P82B715 I2C Bus Extender are specified to 50 metres on the I2C bus with simple twisted pair cable.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1527
Posted: 09:00pm 12 Mar 2022
Copy link to clipboard 
Print this post

Does the TX pin of the UART ever go high or does it just go low and then to high impedance? I believe that's what happens with the soft UARTS of the Propeller.

Of course, I only think of this when I'm away from the shop and unable to test

It might be a non-issue from an electrical standpoint (?)

@Mixtel90
I got the impression from an earlier comment that a diode might limit the bandwidth. Dunno.


Craig

Edit: Disregard....I've had a pint  
Edited 2022-03-13 07:07 by Tinine
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1120
Posted: 09:29pm 12 Mar 2022
Copy link to clipboard 
Print this post

  Quote  I got the impression from an earlier comment that a diode might limit the bandwidth. Dunno.

The diode/resistor is not an active pullup so rise time may be longer. That's why CaptainBoing suggested maybe using a lower value pullup resistor I believe.

Mick's constant current source would sort of be an active pullup.

Bill
Keep safe. Live long and prosper.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5000
Posted: 09:30pm 12 Mar 2022
Copy link to clipboard 
Print this post

I did a multidrop serial for a while but only while I was waiting for some RS422 modules to arrive.
It worked well with 3 slaves but I forget what baudrate I used. Probably 38400.
Cables were cat5 with the maximum distance about 8 metres.

Schottky Diodes are preferred for speed.

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 1 of 4    
Print this page
© JAQ Software 2022