Hi Vladimir,

Try keeping everything within 6 bits all the time. Easily done by bitwise anding with $3F. I assume that the two highest bits of Rx_Data[x] is always zero. If not you should do some anding with them too.

/Ingvar

Checksum:
Ack = 0
FOR i = 0 TO 5
Csum_Data = Csum_Data & $3F
Csum_Data = Csum_Data + Rx_Byte[i] 'Sum all bytes for checksum
NEXT i
Csum_Data = Csum_Data & $3F
Csum = Rx_Data[6]
IF Csum = Csum_data THEN Ack = 1
i = 0
RETURN