Thanks a lot Aratti.
Best Regards
Jamshid Dastur
Can you help me out with one more thing, that is how can i read an sms and store it in an array, lets say an sms contains hi, then which syntax should i use, or if there is some alternative better way...
Syntax1:
buffer var byte[90]
serout portb.6,t300,["at+cmgr=1",13]
SERIN portb.7,t300,1000,oops,["+"],buffer[0],buffer[1]
Syntax2:
buffer var byte[90]
serout portb.6,t300,["at+cmgr=1",13]
for x=1 to 3
SERIN portb.7,t300,1000,oops,buffer(x)
next x
or is there any other way to store the sms in the array,
thanks a lot
Best Regards
Jamshid Dastur
You must send this sms : "123 HI" (123 is the pointer).
Then I suggest the following code:
If everything work, then you should find:Code:buffer var byte[90] SEROUT2 portb.6,3313,["AT^SMGR=1",13] ' Call for sms SERIN2 portb.7,3313,1000,oops,[Wait ("^SMGR:" ),Str buffer \ 5] ' (3313 is baud rate = 300 see PBP manual pag 133) if buffer[1]=48 and buffer[4]=48 then oops ' if no sms has been received then jump to oops label SERIN2 portb.7,3313,[Wait ("123"),Str buffer \ 3] ' If sms is present wait for pointer then load array
buffer[0]=32 (space)
buffer[1]=H
buffer[2]=I
If you want a ready made sms system download it @:http://techni.caliti.es/blog/
Al.
Last edited by aratti; - 12th December 2008 at 12:42.
All progress began with an idea
Hello, i'm stucked at the point that our dear PIC works on 5V, and thus definitely the serin/serout would also generate high and low pulses of 0-5v, while the GSM module which i'm having (SIM508) posses serial transmission module of VMax being 3V...and it's been quoted to use a level converter where necessary, so can anyone help me out with this...
can i use MAX233 in between or would there be any other procedure to follow...
Best Regards
Jamshid Dastur
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks