I've noticed that when I connect/disconnect the RS232 cable to my micro-controller, I receive a garbage character at the other end (my pc).
Is there a way to prevent this?
I want to eventually move to using RS485 with a number of micro-controllers sharing the same bus, and this would prevent adding or removing nodes while the bus is in operation.
Best Answer
A couple of hints that come to mind to make the protocol between MCU and PC more robust:
Take a look at the firmata protocol, pretty much Arduino based, but you can learn pretty much from the implementation.