Hello guys,

I use a pic 16f88 to capture data from the rs232 PC port, the data comes in packets,

for example I get (ASCII characters): P1234 1A , where 1A is the checksum of P1234

ASCII - HEX

P - 50
1 - 31
2 - 32
3 - 33
4 - 34

1 - 31
A - 41

The software that sends the data packets calculates the checksum as follow:

50(P) + 31(1) + 32(2) + 33(3) + 34(4) = 11A and sends only 1A as checksum,
BUT it sends the 1A checksum as ASCII characters, in HEX 31 and 41.

So my question is, how can I calculate the checksum? If I add P1234 I will get 11A in HEX but I could not find a way to compare the 11A with
the 2 bytes checksum I received 31 and 41.

Can anyone please help me to solve this problem?
I am programming tha pic in assembler.
Thak you.