Quote Originally Posted by HenrikOlsson View Post
Hi,

I think it's "the usual" case of not treating the data the same way in both ends.

It looks to me like you are sending ASCII but you're treating the received data as binary/raw numbers.
If you send the decimal digit '1', store that in myArray[0] and later multiply that by 100 what you'll get is 4900 because 49 is the ASCII code for '1'.
To do what you want you can use ARRAYREAD with the DEC modifier or simply use the aproach you already have but "offset" the values to account for the ASCII encoding.
Code:
varResult = ((myArray[0]-48)*100) + ((myArray[1]-48)*10) + (myArray[2]-48)
Or you could subtract 48 when receiving the digits.

/Henrik.
Thanks Henrik! I'll give it a go tonight after work.

Preferably, I'd just send the output of the 8-bit ADC module on the Master chip directly to the Slave (so, 0-255) rather than converting it to ASCII in a 3-digit format (e.g. "027"), but then I can't figure out how to process that in the ISR if I'm only getting one character at a time.