Hi community!
I'm currently working in a project with RS485 involved. I'm trying to replace a device in a RS485 modbus line. First advances were made with a MOXA Nport 5130 to read the commands in a computer and get to know the addressing and data. Now I need to read those same commands in a Arduino to work as a translator for the new device.
My first attempt was with a RS485 CAN Shield from WaveShare. I just used the Receive example in the library and I was able to read the commands in the serial port but the reading was unstable and after some time the connection just fails until I reboot my arduino (Arduino UNO R3)
Recently after looking for some other options to read RS485 and with more industrial protection to avoid noise (more reliable readings) I stumbled upon UNO SPE shield with a lot of good characteristics (SPE shield) wich is directly compatible with Arduino R4 and according to the forum would have a specific library for it but I've been unable to find it (maybe is still in development) and the only references in the official page related to the shield (SPE Shield Getting Started) just uses ArduinoRS405.h and ArduinoModbus library wich are made for ArduinoMKR and the RS485 shield for MKR.
My confusion is related to pinout and connection. According to tech specs (MKR 485 shield) the comunication is made through D6(RXP) and D7(TXP) and the libraries should use by default those pins but in the library page (ArduinoRS485 library) it states in the setPins() instruction that by default used pins are:
Modify the pins used to communicate with the MAX3157 chipset. By default the library uses pin 14 for TX, pin A6 for drive output enable, and pin A5 for receiver output enable.
Wich is logical since pin 14 is labeled as TX but I dont understadn why that instruction just let set 3 pins and the RX (pin 13) can't be modified.
Now, going through SPE shield schematics (Schematic PDF SPE shield) the communication with Arduino is made with UART pins (D0-RX and D1-TX) and RE and DE is connected to D7 and D8 to control the chip.
So my question is about the command setPins() for the ArduinoRS485 library (I want to try that one first instead of Modbus library due some observation I did during first tests) and if the configuration for the Arduino R4 and SPE shield should be like this:
RS485.setPins(1, 7, 8);
I don't really understand why I can't set the pin for RX and most information related to SPE shield is about the ethernet side and the few examples for RS485 communication is used with OPTA devices wich I don't have experience at all.
Thanks in advance
