lesthegrngo Posted May 17, 2019 Share Posted May 17, 2019 Looking at the setup on http://www.mysimpit.co.uk he's using an Arduino Mega as the master for his network. Looking at it there is only one TX and RX used of the three, and all the connections he has used are common with the Arduino Uno boards I have. Is there some reason why the Uno cannot be used as the master in place of the Mega? Cheers Les Link to comment Share on other sites More sharing options...
Roni86 Posted May 17, 2019 Share Posted May 17, 2019 Yes. The Mega has two RS 232 the Uno only one. You need one RS232 for communication with the computer and one for the RS484 Interface. Link to comment Share on other sites More sharing options...
Hansolo Posted May 17, 2019 Share Posted May 17, 2019 (edited) Yes you need a Mega to run as RS-485 Master. The Uno, Nano, Micro only have one serial ports called UART (universal asynchronous receiver-transmitter) port while the Mega has four UART ports. The first/only UART is connected directly to the onboard USB-to-serial interface and is used when you load a sketch unto the board. This is the reason why you should normally not use pins 0(RX) and 1(TX). In order to run a Master unit you need one UART port to handle the communication via USB-to-serial interface to the computer running DCS-BIOS AND another UART to run the RS-485 communication via a MAX487 chip. This will rule out Nano, Uno etc. The only other Arduino having more than one UART is the Due but IIRCC then that cannot run RS-485 with DCS-BIOS as the DCS-BIOS code won't work on the ARM processor of the Due. In theory a Mega Master can run 3 separate RS-485 communication lines. I seem to recall that Ian wasn't sure the Mega have the processor power to handle 3x RS-485 lines at the same time but should be able to handle two. Here is a little more on the serial communication on the Arduinos; https://www.arduino.cc/reference/en/language/functions/communication/serial/ On the slave side you only need one UART to communicate with the MAX487 chip. As far as I can read up on UART should not be mistaken for RS-232. They operate on different voltage levels as well as logic levels are in inverted BUT the UART can be used to run a RS-232 driver chip similar to what we use for RS-485. https://electronics.stackexchange.com/questions/274287/what-is-the-difference-between-rs-232-and-ttl-uart Cheers Hans Edited May 17, 2019 by Hansolo Typo 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album Link to comment Share on other sites More sharing options...
lesthegrngo Posted May 18, 2019 Author Share Posted May 18, 2019 (edited) Thanks guys, I'll get a mega ordered in. Hopefully I can test individual parts by just changing the sketch from referring to the RS485 to an arduino reference so I can use the Uno on a one by one basis **edit** is the MEGA 2560 R3 ok? seems to be the replacement for the old Mega Cheers Les Edited May 18, 2019 by lesthegrngo Link to comment Share on other sites More sharing options...
Hansolo Posted May 18, 2019 Share Posted May 18, 2019 is the MEGA 2560 R3 ok? seems to be the replacement for the old Mega Cheers Les Hi Les, Yes that is perfect Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album Link to comment Share on other sites More sharing options...
lesthegrngo Posted May 19, 2019 Author Share Posted May 19, 2019 Thanks, one is on order! Cheers Les Link to comment Share on other sites More sharing options...
Recommended Posts