My problem is this. I need to send SMS with data from a weighing scale to a given number when a SMS is received by the GSM modem. SMS sending part and data reading from the weighing scale part is ok but responding to SMS is not working in my program.
Can anyone tell me how to send SMS to a given number when SMS is received to the GSM modem. My program is as follows.

include "modedefs.bas"

define OSC 4
DEFINE HSER_SPBRG 25
DEFINE HSER_TXSTA 24h
DEFINE HSER_RCSTA 90h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1

comRs232Out var PORTD.0
comRs232in var PORTD.1
weightGet var word
smsGet var word

Initialize:

Start:
HIGH smsRead
HSEROUT ["AT+CMGF=1",13]
PAUSE 500
HSEROUT ["AT+CMGR=1",13]
PAUSE 500
HSERIN [smsGet]
PAUSE 500

IF smsGet = " " THEN
goto Start
ELSE
SERIN comRs232In, T2400, [weightGet]
PAUSE 500
HSEROUT ["AT+CMGS=",34,"0718116393",34,13]
PAUSE 500
HSEROUT [weightGet,26]
PAUSE 500
HSEROUT ["AT+CMGL=1,4",26]
PAUSE 15000
goto Start
ENDIF