Hi,
There are two WHILE 1 statements but only one WEND:Although compiling your code as it was did NOT give the error message you show removing one of the WHILE 1 makes it compile without errors. Make sure you're compiling for the correct device.Code:WHILE 1 A: ' CHECK IF MODEM IS WORKING OK AND SET ECHO OFF HSEROUT2 ["SENDING AT",13,10] HSEROUT ["AT",13,10] GoSub GetResponse HSEROUT ["ATE0",13,10] GoSub GetResponse HSEROUT2 ["ATE0 RESULT=OK",STR MESS\500,13,10] WHILE 1 HSEROUT2 ["SEND COMMAND",13,10] HSERIN2 [STR MESS\500\13] HSEROUT2 ["SENDING-",STR MESS,13,10] HSEROUT [STR MESS,13,10] GoSub GetResponse WEND
Finally, you generally don't want to have the reset flag option set to YES for the EUSART interrupt because the flag is cleared automatically by the hardware when the RX buffer is read.
/Henrik.




Bookmarks