Hi guys.
I have a new project on Arduino mega.
And I have 5 max485 modules.
Using ModbusMaster library.
I want to connect all max485 modules to one serial, example Serial3.
How?
Code:
Bro I know what rs485 network.
I know that in the rs-485 network the principle of connecting 1 module is many devices. But I have a different problem, so the question is different.
But I can't find in. Google an answer to it, so I wrote here.
Thx.
the Mega has three spare hardware serial ports Serial1, Serial2 and Serial3 which would support three MAX485 boards - possibly two more using SoftwareSerial - no idea if this would work!
why do you require five RS485 ports - are you using five different RS485 protocols?
I have never required more than two independent RS485 ports on a microcontroller
Edit: if you require five hardware serial ports I recently used six serial hardware ports on a PIC24FJ1024GA610
I connect three to Serial1, Serial2 and Serial3.
And two on SoftwareSerial.
On SoftwareSerial max485 not working, I don't know why.
That I want connect all to one serial