Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] sms receive and display on lcd.

Status
Not open for further replies.

sahil_manu18

Newbie level 1
Newbie level 1
Joined
Sep 17, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
india
Visit site
Activity points
7
hello any one help me regarding the receive sms and the sms display on lcd. my code is working good.. like if is send sms "hello" then i recieve sms "hello" like below.

+CMT: "+91XXXXXXXXXX" ........... "hello".
this is also displaying on LCD with all text ... but i want to display only hello on lcd.. so plz help... my code is below...

Code:
sbit LCD_RS at RC1_bit;
sbit LCD_EN at RC0_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;

sbit LCD_RS_Direction at TRISC1_bit;
sbit LCD_EN_Direction at TRISC0_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
char temp[80]={' '};
char uart_rd,h=0;
void gsm();
void main()
{
unsigned int i,t=1;
unsigned char j,x=0,d=0,rec;
 main:  Lcd_Init();
   Lcd_Cmd(_LCD_CURSOR_OFF);
  UART1_Init(9600);
  gsm();
  Delay_ms(1000);
  Lcd_Out(2, 5, "ready");
   while(1)
    {
     if (UART1_Data_Ready()==1)
     {
        UART_Read_Text(temp, "ok", 80);
        Lcd_out(1,1,temp);
      
      }
}
  }

  void gsm()
{
UART1_Write_Text("AT");
UART1_Write_Text("\r");
 Delay_ms(5);
UART1_Write_Text("AT+CMGF=1");
UART1_Write_Text("\r");
 Delay_ms(5);
UART1_Write_Text("AT+CNMI=1,2,0,0,0");
UART1_Write_Text("\r");
 Delay_ms(5);
}
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top