Discussion in "Embedded GSM Development" started by    DaveChika    Oct 25, 2010.
Sun Oct 31 2010, 12:10 am
#41
@majoka
i had a likely problem on that,but when my total array of data is less than [100]it shows no errors,i tryed using 89c55 which has a bigger memory but the same, i think it has to do with some settings on keil environment or some #include files.
please majoka,i give you reply 2 morrow on the earlier code u sent decode.rar,cos am not close to my projects now.
Sun Oct 31 2010, 02:00 am
#42
hi DaveChika
try this latest code
i solve the memory issue now the keyword idata should be used in that case mean in 8052 where 256 bytes memory is accessed
89c55 has 20 k rom but still 256 bytes ram and our issue is ram
but now this issue is solved now u not need of lcd but for debugging purpose for a while u try on lcd in proteus
now try total message length more than 100 now array is of 150 bytes but u can change it according to ur need as u mention that 41 bytes r ur message need
anyhow let try it and update the results and when u free mail me or upload the keil debugging software too



Attachment
 DaveChika like this.
Sun Oct 31 2010, 03:07 am
#43


@ExperinmenterUK
i have tryed as u sugessted but its like am not get the code (pionters) correctly,my keil keeps telling that pointer indirection and cant pass from non pointer to a pointer,pls can you show me a brief with he above variable names.

DaveChika


Without actually being there it is very difficult to know exactly what KIEL is
complaining about.
These are valid uses of a pointer;
char  serialbuffer[10];             //create a buffer..that is reserve some space for your use

char  *serialPtr= &serialbuffer;   //create a pointer and give it the address of that buffer
                                                    //& serialbuffer means "the address of"  serialbuffer

if ( *serialPtr==1)                   //means ...If the byte serialPtr points to  = 1 .. do something
     {... do something}

if ( serialPtr[0]==1)              //this means the same thing 
     {... do something}


Using pointers and buffers often leads to errors, so learning about them now will save a lot of
hours wasted later.


[ Edited Sun Oct 31 2010, 03:15 am ]
 DaveChika like this.
Mon Nov 01 2010, 09:38 am
#44
@majoka
thanks for the array code,but its not filtering the data correctly,see the screenshots to get what i mean.
thanks so far for your help and interest,i have not forgotten my promise to upload the debugging software to you,i have so many requets from viewers on this thread also.i wiil its a promise majoka.







Mon Nov 01 2010, 09:55 am
#45
hi DaveChika
let me know
ru use same code as i upload in array or edit it
in ur keil screen shot
msg1=\r\r\nOK\r\n\r\n+
i was constring ur using is started from
+CMGR as it is seen in proteus shoot
now it mean in start
\r\r\nOK\r\n\r\n
is extra i not consider it in coding that why filtering is not proper
in proetus this is not shown \r\r\nOK\r\n\r\n
i see it just tell me code is same as i mail u or edit a little bit then i update the thread
Mon Nov 01 2010, 10:00 am
#46
Hello for those of you viewing this thread from start,here is the software that enables you to simulate your protues from keil environment,i.e you can control your debugging on protiues from keil,just select your protues vsm51 simulator as your option in keil debud options.
not yet clear,feel free to say so.
Attachment
 rushabh0013majoka like this.
Mon Nov 01 2010, 10:21 am
#47
thank u so much DaveChika
try this code
this replace this function with previous one and updates about results
void read_text( unsigned char *msg,unsigned char *no ,unsigned char *time)
{
unsigned char *temp;
temp=msg;
do
msg++;
while(*msg!='+');        
do
msg++;
while(*msg!='+');         //  reaching at no
do
*no++=*msg++;
while(*msg!='"');         // reaching at time
*no++='\0';
msg++;
msg++;
msg++;
do
*time++=*msg++;
while(*msg!='+');         // raching at message
*time='\0';
do
msg++;
while(*msg!='\n');
msg++;
do
*temp++=*msg++;
while(*msg!='\r');       // reaching at end of message
*temp='\0';

lcd_cmd(0x80);            // ist line address
lcd_str(rec_no);          // array having receipt no
lcd_cmd(0xC0);            // 2nd line address
lcd_str(time_date);       // array having date and time
lcd_cmd(0x94);            // 3rd line address
lcd_str(msg1);            // array having message 
}


try with small code first becoz lcd is small just can display 20 characters if message is long then 20 it will overwrite date time ans cell no etc bur filtering will be ok
Mon Nov 01 2010, 10:25 am
#48
okay majoka,
heres the screenshot with your array code untouched,i cant get anything on my msg1,the screenshots from the earlier post was with your array codes untouched except the one showing the msg1 buffer of what i receive.
also one more question majoka,
u disabled serial interrupt ("IE=ox00"),what if i want to send another sms after i am done with the first one,how are my goin to receive it if SBUF is diasabled.

Mon Nov 01 2010, 12:01 pm
#49
ok DaveChika
i see it again just one thing confusing that is \r\r\nOK\r\n\r\n in start
ok do this experiment and upload a screen shot
download a terminal program by bray in download section on this site and send all commands in same formats as u send it in coding
tick hex, dec and binary option in front of receive window after each commanding u will see a result in window as ascii and its equivalent in decimal ,hex and binary too
then upload the screen shot of that that i will clarify that why this extra ok is coming from modem or it is some coding mistake
Mon Nov 01 2010, 05:36 pm
#50
@MAJOKA,
there was a mix up on our updates,i was replying ur earlier post before this last one.
okay here is the latest screenshots of the last codes you sent (adding more filters),its working out correct,i am very very grateful majoka for your support so also to experinmenteruk for his pointer lessons,i have to go and brush up my pointers useage in C++.
one more quetion majoka about dissbling of the serial port.what if i want to send another sms after the am done with the first one, how am gonna do it if the serialport (IE=0x00) is disabled on the program,lets say after sending device1 on and there was response on my device and i want to turn it off by sending another sms device off, on the code the serialport was turened off to enable the program filter the contents of msg1,so how will it respond to my second command to turn off if serial interrupts is disbled. i will pm you,before i forget howdid you see the software i uploaded for debuging protues from keil hope its useful also,just making embedded desings mor interesting and fun

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

PedroDug
Sun May 19 2024, 05:39 pm
JewelAmuck
Sun May 19 2024, 03:06 pm
Minniemus
Sun May 19 2024, 07:39 am
Andyhet
Sat May 18 2024, 07:28 am
BrettTibre
Fri May 17 2024, 06:14 pm
Gordonfax
Fri May 17 2024, 10:28 am
Davidspils
Fri May 17 2024, 10:19 am
Patricknoind
Fri May 17 2024, 09:53 am