Switching between Tx and Rx with ModbusMaster library and Max485 chip.

Hi everyone,

I am trying to interface with a heatpump using an Arduino over the MODBUS protocol and I'm having a bit of difficulty.
I'm using the MAX485 chip to convert my serial signal to the RS485 format which is what the heatpump uses and I'm using the Modbus Master (Arduino Playground - ModbusMaster Library) library to generate the output of the Arduino.
The chip however is only half duplex and needs to be switched between Tx and Rx modes between when a request is sent out over RS485 and a response is received. I am using digital pin 2 on the Arduino to carry out this function.
There is no facility in the ModbusMaster library for doing this and I would appreciate it if someone could tell me what changes I need to make to the library to enable this function.

Thanks in advance.

I have the same problem!
any news?

thanks!

I'm pretty sure there was a thread about this recently, have a search.

You probably have to modify the library and either detect the end of the last byte or set a timer to tell you when the last byte has been transmitted, then control the TE pin of the transceiver.


Rob