Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:48 07 Jul 2025 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 : Comms Master/Multiple Slaves

Author Message
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 12:23pm 06 Jul 2016
Copy link to clipboard 
Print this post

I know Master controllers to multiple slaves has been discussed a fair bit recently.

The concept of a HC-12 wireless serial UART on the master talking to multiple slaves HC-12 can be done, just needs requests & hand shaking etc.

[Code]
Master: "Hello Slave1, Send Me some data".
Slave1: "Slave1 Reporting, here's that data...".
Master: "Hello Slave2, Do this job..."
Slave2: "Slave2 Reporting, Job done successfully".
[/code]

Etc, etc.
All good as long as the logic makes sure they don't talk over each other.

But, can this be done with hard wired Com ports?

I know that generally RS-232 serial type coms can't be physically wired together.
Known that since forever... Level shifting just would not happen.

But is there a device that allows Master / Multiple Slave multiplexing that's simple to implement?

A simple chip solution?
One that would replicate the multi wireless environment.

Thanks

Phil.

 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 12:41pm 06 Jul 2016
Copy link to clipboard 
Print this post

RS-485 can do multidrop.

MMBasic supports RS-485. Look in the serial section. There is a drive enable PIN to define that works with RS-485 driver chips.
Micromites and Maximites! - Beginning Maximite
 
Justplayin

Guru

Joined: 31/01/2014
Location: United States
Posts: 327
Posted: 01:28pm 06 Jul 2016
Copy link to clipboard 
Print this post

It might not suit your exact needs, but there is the option of software serial ports using CFunctions which are included in then firmware download. The PDF docs says the CFunctions work on any I/O pin to provide any number serial ports.

--Curtis
I am not a Mad Scientist...  It makes me happy inventing new ways to take over the world!!
 
mikeb

Senior Member

Joined: 10/04/2016
Location: Australia
Posts: 174
Posted: 02:46pm 06 Jul 2016
Copy link to clipboard 
Print this post

Hi Phil,
Use an RS485 transceiver which will give you a simple 2 wire, differential, half duplex communications link capable of up to 4000 feet. Use COM1 and the DE enable pin described in the MM manual. Most 8 pin transceiver's have the same footprint so tie pins 2 and 3 together and wire to the MM DE enable pin. It will be completely transparent to your link so just use standard serial communications code. The first byte in your packet should be the address of the remote slave module so this device should be the only one that responds to a data request.
RS485 comms, using the Modbus Protocol, has been a specialty of mine for many years.
2016-07-07_004453_MAX3483.pdf
There are 10 kinds of people in the world.
Those that understand binary and those that don't.
 
mikeb

Senior Member

Joined: 10/04/2016
Location: Australia
Posts: 174
Posted: 02:54pm 06 Jul 2016
Copy link to clipboard 
Print this post

@Phil
PM me with a postal address and I can send you some surplus devices I have in stock 'gratus'.Edited by mikeb 2016-07-08
There are 10 kinds of people in the world.
Those that understand binary and those that don't.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 11:32pm 06 Jul 2016
Copy link to clipboard 
Print this post

  mikeb said   @Phil
PM me with a postal address and I can send you some surplus devices I have in stock 'gratus'.


Thanks Mike,

I'll take you up on that.

I can only make the monster bigger.....

Phil.
 
mikeb

Senior Member

Joined: 10/04/2016
Location: Australia
Posts: 174
Posted: 10:24am 07 Jul 2016
Copy link to clipboard 
Print this post

@Phil
It's fun watching monsters evolve sometimes.
I'll pull out what devices I have and await a postal address.

Mike B.
There are 10 kinds of people in the world.
Those that understand binary and those that don't.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025