Hi,
Something like this might work then:
/Henrik.Code:RawWord VAR WORD Adress VAR BYTE Value VAR WORD HSERIN[RawWord.Byte1, RawWord.Byte0] ' Receive two bytes and store them in RawWord, high byte first Adress = (RawWord.Byte1 & 252) >> 2 ' Get the 6 top bits and store them in variable Adress, 0-63. (The &-operation may not be needed) Value = RawWord & 1023 ' Get the bottom 10 bits and store them in variable Value, 0-1023




Bookmarks