![]() |
Forum Index : Microcontroller and PC projects : Comms Master/Multiple Slaves
Author | Message | ||||
Phil23 Guru ![]() Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
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 StatesPosts: 1427 |
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 StatesPosts: 327 |
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: AustraliaPosts: 174 |
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: AustraliaPosts: 174 |
@Phil PM me with a postal address and I can send you some surplus devices I have in stock 'gratus'. 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: AustraliaPosts: 1667 |
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: AustraliaPosts: 174 |
@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. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |