Take a look at HEX2 var modifier in the SERIN / SEROUT command

this will translate var to 2 bytes of HEX