- Tue Jul 18, 2017 3:45 am
#68305
The answer is going to depend a bit on what device (s) you are trying to talk to over RS-485.
RS-485 just defines the physical interface (like the voltage levels). It allows for configuration in bi-directional, multi-drop and master / slave arrangements. It says nothing about protocols or the data formats to be used.
In the simplest case RS-485 can be used unidirectionally to send or receive asynchronous serial data like you get from the TX and RX ports on the ESP8266. In this case you can just wir the data lines of the MAX3485 direct to the TX and RX pins and permanently enable the drivers on the MAX3485.
In more complex examples, bi-directional, multidrop etc you would need to wire the enable lines to a GPI pin and the software would have to decide when to enable these according to the protocol.
If the data is being sent synchronously then you can't use the TX and RX ports directly but would need to consider other techniques like bit banging. WHether these are feasible will depend upon the clock rate you are trying to support.