send sms from pic 16f877a via gsm module in mikro c pro

Status
Not open for further replies.

madhushan90

Newbie level 6
Joined
Jul 26, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,362
I have written a code for send an sms from pic 16f877a via gsm module(New Siemens T35i) . Code is working in the proteus but when programmed it, tx output is around 5v and not changing. Help me to find out the problem here is the code i have used.

Code:
void sms_send();
char sms[11];

void main() {
     UART1_Init(9600);              // Initialize UART module at 9600 bps
     Delay_ms(100);                 // Wait for UART module to stabilize
    sms_send();
 }
void sms_send()
{
int i;
/*UART1_Write_Text("AT\n\r");  */
delay_ms(500);
UART1_Write_Text("AT+CMGF=1");
UART1_Write(0X0D);
delay_ms(500);
UART1_Write_Text("AT+CMGS=\"0714592063\"");
UART1_Write(0X0D);
UART1_Write_Text("fggfgf");
delay_ms(500);
UART1_Write(26);
}
regards.
 

Code is working in the proteus
It's just a simulation, and not necessarily true to real life.
If you'd started in real life, then you would first have written a small program for your microcontroller first, to
flash an LED or something, to ensure that a few of the basics are working, such as:
* power to microcontroller
* oscillator functioning
* compiler and programmer functioning
* ability to download and execute programs

I suggest you do that. Just because you've decided to simulate first doesn't mean you can short-cut the steps above.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…