Hi Dave,
The WAIT modifier is used with serial input commands not with the serial output commands. It's used to only start "capturing" data starting with a certain character(s).
Simply have your SERIN2 command capture the operator in a BYTE variable. Then, when you have Num2 as well you can use a bunch of IF-THENs to determine what the operator is, and act upon it accordingly OR even better, have a look at Select Case.
Every character, A,B,C, +, -, * etc is represented as a single byte number. So all you need to do is something like:Code:SERIN2 PORTC.5, 16780, [OP] 'MODE 16780 = 2400 BAUD INVERTED
And so on.Code:IF OP = "+" Then Total = Num1 + Num2 ENDIF
Hope that helps.
/Henrik.




Bookmarks