Discussion in "Embedded GSM Development" started by    mldt28    Feb 22, 2013.
Fri Feb 22 2013, 12:15 am
#1
i am using a GSM/GPRS SHIELD SIM900D
and a PIC18f4550..
i can't send any message... can anyone pls help me with this.. pls... what should i do here???

// LCD module connections
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;

sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
//End of LCD Initialization

void main() {
  TRISD=0;
  PORTB=0;
  PORTD=0;
  TRISB = 0;
  ADCON1 = 0x0F;

  Lcd_Init();


  while(1){
UART1_Init(9600);
Delay_ms(3000);
UART1_Write_Text("AT");
UART1_Write(13); //Enter key = CF + LF
UART1_Write(10);
delay_ms(2000);
UART1_Write_Text("AT+CMGF=1");
UART1_Write(13); //Enter key = CF + LF
UART1_Write(10);
delay_ms(2000);
UART1_Write_Text("AT+CMGS=\"+639184637272\"");
UART1_Write(13); //Enter key = CF + LF
UART1_Write(10);
delay_ms(2000);
UART1_Write_Text("Hello Wolrd!");
UART1_Write(0x1A); // <ctrl-z>



delay_ms(3000);
               Lcd_Cmd(_LCD_CLEAR);
               Lcd_Out(1,1, "SENT");
   }
}
Fri Feb 22 2013, 04:15 am
#2
There are many such threads in our GSM and 8051 forums.
Have at look at the answers given there.

The methods will apply to PIC projects as well.


[ Edited Fri Feb 22 2013, 04:16 am ]
Sun Feb 24 2013, 09:08 pm
#3
Connect your modem to pc once and make sure baud rate is 9600. Then connect controller to pc and see if commands are coming properly or not. Lets us know what happened.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

ArktiTic
Sun May 05 2024, 07:06 pm
CesslasyNear
Sun May 05 2024, 02:58 pm
chimichmedic1204
Sun May 05 2024, 11:06 am
Jamiegob
Sun May 05 2024, 10:11 am
Gregoryjed
Sun May 05 2024, 10:02 am
Mariocax
Sun May 05 2024, 08:51 am
WilliamErync
Sun May 05 2024, 02:35 am
Danielnof
Sat May 04 2024, 11:12 pm