Mikrobus RS485 Click module

I'm developing a project that will need a RS485 multi-drop bus, and we have some modules from Mikro -- their click shield and RS485 click module.

They have libraries for the module, but it's in dpkg format as is only for their own compiler (which is not free).

The board uses D0 and D1, and just hooks the built in UART to a Transceiver, with D5 or D6 hooked to the R/W enable.

I think I should be able to get it to work, I just need to be able to use D6 as the R/W pin. Is there some way I'm missing to switch that pin when I'm transmitting out of the UART, other than asserting it before I call Serial.print (as an example)? I'm asking because I'd like to use a ModBus slave library, instead of writing my own modbus stack.

Thanks for any help...

Chris

I'm asking because I'd like to use a ModBus slave library, instead of writing my own modbus stack.

A serious ModBus RTU library should support a read/write enable pin as RS-485 half-duplex is the default physical layer for ModBus RTU.