Electrix said:
I'm a bit confused now...Can Manchester Encoding be implemented in Hardware UART ? Nigel, I saw the codes on the site you mentioned..I think they are all for a Software UART...I need a solution for a H/W UART..
I have seen applications that use the hardware UART for Manchester coding, but it's rather clumsy and not 100% correct, so it's not usually used.
The inversion I mentioned can be done easily in software, but for the hardware UART you will have to do it in hardware instead. A simple transistor and two resistors is all that's required (on both TX and RX).
The reason it doesn't work is quite simple (I actually found out by using a scope on a receiver a number of years ago), the radio modules aren't DC coupled!. The rest state of the radio system is LOW, but the rest state of the RS232 is HIGH, if you try and hold the radio HIGH it will drop LOW again after a few milliseconds (rather noisely) - it's this that corrupts the RS232. If you invert the RS232 then it's resting state is LOW, and it only goes HIGH for a maximum of 9 bit times, this is short enough to pass through the AC coupling (at least on the modules I've used!).