real-koketso
Newbie
i'm using the GPRS/GSM SHIELD SIM900 module which is designed to interface with Arduino board, specifically this kind gsm sim900
i have a hex file(i will called it hex file 1) which was working correctly when communicating with the GSM module via AT89s52 microcontroller i got the hex file from this link. The GSM module was responding with "OK" respond after serially transmitting "ATE0".i then used a different hex file(lets call it hex file number 2) generated from the below mentioned code and that is when the GSM stopped responding,....then now when i use the first hex file(hex file number 1) the module no longer responds to ATE0 or any command but when i call the GSM number from my phone it rings, could it be that the module is destroyed or having some sort of software bug and how can i fix it? I've already reset the module using the hardware rest pin but it still doesn't respond.
i also made a simulation of the circuit diagram on proteas and the GSM module on proteas responds correctly(to hex file number 1) but the same hex file no longer gets a response on the physical circuit. here is what the circuit looks like
i have a hex file(i will called it hex file 1) which was working correctly when communicating with the GSM module via AT89s52 microcontroller i got the hex file from this link. The GSM module was responding with "OK" respond after serially transmitting "ATE0".i then used a different hex file(lets call it hex file number 2) generated from the below mentioned code and that is when the GSM stopped responding,....then now when i use the first hex file(hex file number 1) the module no longer responds to ATE0 or any command but when i call the GSM number from my phone it rings, could it be that the module is destroyed or having some sort of software bug and how can i fix it? I've already reset the module using the hardware rest pin but it still doesn't respond.
C:
#include <reg52.h>
unsigned char *NUMBER = "+27738849014" ; //Here insert your number where you want to send message
void ser_init();
void tx(unsigned char send);
void tx_str(unsigned char *s);
unsigned char rx();
void sms(unsigned char *num1,unsigned char *msg);
void gsm_delay();
unsigned int dell;
int main()
{
ser_init();
sms(NUMBER, "Welcome to the Embetronicx");
while(1);
}
void ser_init()
{
SCON=0x50;
TMOD=0x21;
TH1=0xFD;
TL1=0xFD;
TR1=1;
}
void tx(unsigned char send)
{
SBUF=send;
while(TI==0);
TI=0;
}
void tx_str(unsigned char *s)
{
while(*s)
tx(*s++);
}
unsigned char rx()
{
while(RI==0);
RI=0;
return SBUF;
}
void gsm_delay()
{
unsigned int gsm_del;
for(gsm_del=0;gsm_del<=50000;gsm_del++);
}
void sms(unsigned char *num1,unsigned char *msg)
{
tx_str("AT");
tx(0x0d);
gsm_delay();
tx_str("AT+CMGF=1");
tx(0x0d);
gsm_delay();
tx_str("AT+CMGS=");
tx('"');
while(*num1)
tx(*num1++);
tx('"');
tx(0x0d);
gsm_delay();
while(*msg)
tx(*msg++);
tx(0x1a);
gsm_delay();
}
i also made a simulation of the circuit diagram on proteas and the GSM module on proteas responds correctly(to hex file number 1) but the same hex file no longer gets a response on the physical circuit. here is what the circuit looks like