Discussion in "Embedded GSM Development" started by    kirangowle    Nov 20, 2010.
Thu Dec 09 2010, 04:55 pm
#51
hi kirangowle
TI is an transmit interrupt flag
TI_flag is any general bit
it can not be replaced with each other
Thu Dec 09 2010, 06:09 pm
#52
Hi,

I have made little modification well this is also not working as per expected.
Problem is, for first msg working fine.
when i send another msg its entering into the loop but being hanged.
void read_notification()
{
	IE=0x00;
	lcdcmd(0x01);
	lcdcmd(0xd4);
lcddata('Z');
delay(50);
	clear();

	SMSString("AT+CMGR=");
        tx0(MyBuff[12]);
        SMSString("\r");
        IE=0x90;
        delay(100);
        read_text(msg1,rec_no,time_date);
		clear();
// clear MyBuff[] so that next index no can be stored. 
		clear_mybuff();

}
SMSString( "AT+CNMI=2,1,0,0,0\r"); // notification of new sms
while(1)
{
IE=0x90;
k=0;
lcdcmd(0xd4);
lcddata('R');
delay(100);
while(!NewMessage);
{
lcdcmd(0xd4);
lcddata('I');
delay(10);
NewMessage = 0;
read_notification();
IE=0x90;
}
//New msg indication.
// +CMTI: "SM",3

}

void clear_mybuff()
{
	unsigned int a;
	for(a=0;a<=15;a++)
		MyBuff[a]=0x00;
}
Thu Dec 09 2010, 10:07 pm
#53

its entering into the loop but being hanged.


in which loop it enter and hang
may be there is memory overlapping try to increase buffer size to 20 or 25 bytes
Fri Dec 10 2010, 12:14 pm
#54
Hi mojaka,

When 2nd msg arrives its entering in read notification() clears the screen and displays 'Z' and then its being hanged.
Fri Dec 10 2010, 08:17 pm
#55
well there is no need to disable interrupts, it can cause problems later on.

void tx0(unsigned char x) //send data to serial port 0
{
        SBUF=x;
        while(!TI_flag);
        TI_flag=0;
}


And you should not use tx0 function inside interrupt.


[ Edited Fri Dec 10 2010, 08:18 pm ]
Fri Dec 10 2010, 09:49 pm
#56
hi kirangowle
debug it with keil
connect modem to serial port in Proteus send data to serial port and see fee back on proteus
also use pproteus vsm plug in with keil it will easily catch the error point
in read_notification() function write a character to lcd after each line so we detect a point where its get stuck


lcddata('Z');
delay(50);
lcddata('A');
clear();
lcddata('B');
SMSString("AT+CMGR=");
lcddata('C');


Tue Dec 14 2010, 04:45 pm
#57

What is that proteus vsm plugin.
Tue Dec 14 2010, 05:44 pm
#58
hi kirangowle
download from here
1) http://ifile.it/bascgtf
or
2) http://ifile.it/bascgtf/debugger.zip
install it after hat it will merge into keil
see the last option it is Proteus vsm simulator
it will come when u install the above software


Tue Dec 14 2010, 06:15 pm
#59
After this i have to debug in proteus or in keil itself guide me to proteus?.
Tue Dec 14 2010, 11:15 pm
#60
hi kirangowle
go through these links
http://www.labcenter.com/support/vdmkeil.cfm
http://www.labcenter.com/support/vdmavr.cfm

at first u need to enable from Proteus debug-> use debug monitor
from keil use it as u see in above screen shoot

steps:
1.In Keil options select proteus VSM monitor under debug tab.
2. Build the project in Keil. Select to generate hex file also.
3. In Proteus, under properties (ctrl+E over the part) of 8051 point to the above hex file as program file.
4. Start the simulation with remote debug monitor selected.
5. Start debugging from keil.


if u get this message " the target DLL has been cancelled. the debugger is stopped"
then do these steps
1. download vdmadi.exe from Labcenter and install.
2. download this cracked prospice.dll and replace the original one.
3. check debug-use remote debug monitor in Proteus.
4. Config keil51, debug-Proteus monitor 51 driver - setting - ip 127.0.0.1 for debug on same computer. Port 8000.



Get Social

Information

Powered by e107 Forum System

Downloads

Comments

scaneraNom
Sat May 04 2024, 02:21 am
gtaletrzua
Fri May 03 2024, 10:55 am
Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am