Suppose I have a data-link that can be connected such that the incoming signal can be either polarity, ie idle line is high or low. And that I have no control over which way the connection is made. What would be my best choice of encoding for the data?
I don't need much more than 5000 bits/second.
One way would be to have an AVR with two USARTs, one of which has an inverter in the data line, and use the one which doesn't show errors. Or Manchester, or NRZI, but those both need extra hardware to receive. I'd like to keep the hardware simple if I can. My data rate is low enough that I could concoct something using pulse-width as a bit value indicator.