Extracted the Manchester formatting function for use in ERT, now also returns an indication of bits in error.