Last edited by Archangel; - 11th July 2008 at 04:57.
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.
Hi,
Code stop working at this last line:
HSERIN 5000,IT,[WAIT(13,10), STR myarray\62] or using this line HSERIN 5000,IT,[WAIT("+CMGR: 1,,23"),skip 2, STR myarray\62]
is the same
If i put the command line success: High PortD.2 (to see where code stops) on the next line
IT:
HSERIN 5000,IT,[WAIT(13,10), STR myarray\62]
success: High PortD.2
Nothing but if a only put
HSERIN 5000,IT,[WAIT(13,10)]
success: High PortD.2
Led lights so the code is good before that line and specialy the " , STR myarray\62]" command , please give me you input on this.
Thanks
Why not try pulling just part of the string first...like the first few characters and make sure you can get those correctly before you try grabbing the whole thing...
And if your 13,10 is actually 13,10, then you're ok...but what if your 13,10 is actually 10,13?
Hi,
If i compriend you i have to try a small array like:
............................
myarray var byte[4]
............................
HSERIN 5000,IT,[WAIT(13,10), STR myarray\4]
The 13,10 situaction as i said i put after that this line command
..............
success:
High PortD.2
..............
and it works sow i bealive that is no problem on that.
Code:@ Device HS_OSC ' High Speed Crystal define OSC 20 ' Check the spelling of OSC, must be in capital letter Include "modedefs.bas" ' Include serial modes ' Define LCD registers and bits Define LCD_DREG PORTB 'Lcd D 4-bit parallel register starts at PortB.4 to PortB.7 Define LCD_DBIT 4 Define LCD_RSREG PORTB Define LCD_RSBIT 2 Define LCD_EREG PORTB Define LCD_EBIT 3 Define LCD_COMMANDUS 2000 ' Command Delay (uS) Define LCD_DATAUS 50 ' Data Delay (uS) DEFINE OSC 20 'Define oscilator frequency DEFINE LCD_LINES 4 'Number lines on LCD DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1 DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16% DEFINE HSER_CLROERR 1 ' Clear overflow automatically myarray var byte[4] TrisD.2=0 TrisC.6=0 TrisC.7=1 B0 var byte High portD.2 Pause 500 Low portD.2 Pause 500 High portD.2 Pause 500 Low portD.2 Pause 500 LOOP: HSEROUT["AT+CPMS=",34,"SM",34,13] HSERIN 5000,LOOP,[WAIT("OK")] ' have add success:High PortD.2 and works IP: HSEROUT["AT+CMGR=1",13,10] HSERIN 5000,IP,[WAIT("OK")] ' have add success:High PortD.2 and works IT: HSERIN 5000,IT,[WAIT("OK")] ' from here stops and dont go to IT: , have puted HSERIN 5000,IT,[WAIT(13,10), STR myarray\4] tha same resolt and have puted HSERIN 5000,IT,[WAIT(13,10)] works led ligth and final have puted HSERIN 5000,IT,[WAIT("OK")] wait for the last OK afther pdu array and do not work and do not goto IT success: High PortD.2 End
Hterminal gives this:
AT+CPMS="SM"
+CPMS: 1,15,1,15,1,15
OK
AT+CMGR=1
+CMGR: 1,,23
0791539126010000240C915391663921010000807070819341 400453FA1B0E
OK
Last edited by camolas; - 11th July 2008 at 19:12.
Tha small array do not work i mod the line from HSERIN 5000,IT,[WAIT(13,10), STR myarray\4] to:
IT:
HSERIN 5000,IT,[WAIT("OK")]
success:
High PortD.2
End
to get the last ok aftar the phone sends the pdu array was i use to see if the others hserout/hserin lines , and try to with the all pda array and with the 1sts 4 bytes and and nothing i have seen the hterminal and the code stops at last OK dont go back to IT: thats strange.....
Bookmarks