I am planning on building a system with one master and multiple slaves using MSP430 microcontrollers. The microcontrollers must talk with each other with serial interface using RS-485. I now need to decide how the messaging should be implemented. The microcontrollers are several meters apart and there must be a possibility for atleast 20 slaves. The slaves need to be able to send messages back to the master.
The current implementation is made using a single UART. Slaves can only send messages after they have received a message from the master. The system has an additional non standard polling signal (on/off) which tells other devices that the line is busy. This is non-standard and an awful way, but without it the system can't know if it is safe to send messages.
I am new to this area and i dont really know about the options? I have read about DMX512, but it can only send messages from the master. There are things like MODBUS, LIN, SMBUS, I2C etc. which can message to multiple devices, but are they what I am looking for?
Is the best solution to use CAN bus using MC2515 microchip? Or should I use two UARTS in one RJ45 cable where one is from master to slaves and another one is from slaves to master so I could pass a token between the slaves?
In general what kind of protocol should I be looking into? I would like the system to be as flexible as possible.