EncodedData var word [4] should be EncodedData var word [5]

2 bytes are needed for each byte conversion to manchester.

What's happening is you're corrupting RAM by going out-of-bounds
in your EncodedData array.