I don't think I would worry about encoding anything at the moment. You're sending short packets. As long as you've got preamble and a sync'ing character, you should be good to send the raw port data, in short bursts anyways.
i.e. SEROUT datapin , mode , whatever , $55,$AA,$FE,raw_portb_data (assuming portb.7 isn't actually used)
Just keep resending it as long as a key is pressed and code the receiver to look for the same thing that you're sending.
Bookmarks