Is smarmengol Modbus software serial compatible with half duplex RS485 modules?

are more modifications to the library in my future?

I think so. This doesn't make sense:

        case 0:
        default:
            UCSR0A=UCSR0A |(1 << TXC0);
            break;

That looks like code for case 0, not case 4 (default). When it's a software serial library, there is no "transmit complete" flag, and there is no "control and status register".

Unfortunately, AltSoftSerial and NeoSWSerial differ in how they handle transmission: AltSoftSerial has a transmit buffer that empties in the background, while NeoSWSerial blocks until the characters are transmitted. Detecting "transmission complete" will be different for these two libraries.

AltSoftSerial is much more efficient and reliable than NeoSWSerial, so I would recommend it any day of the week. You may have to use time to "know" that the AltSoftSerial transmit buffer is empty... unless you want to modify AltSoftSerial, too. :wink:

Hey, I already did that with NeoICSerial to add the attachInterrupt feature for RX chars. I could add a "TX complete" callback, too.